Get an item by its uuid.

@param $uuid

@return OrderingItem|null
19577
public function getItem($uuid)
    {
        $found = null;
        foreach ($this->items as $item) {
            if ($item->getUuid() === $uuid) {
                $found = $item;
                break;
            }
        }

        return $found;
    }
862448
public function getByUID($uid)
    {
        return array_filter($this->getComponents(), function ($item) use ($uid) {
            if (!$itemUid = $item->select('UID')) {
                return false;
            }
            $itemUid = current($itemUid)->getValue();

            return $uid === $itemUid;
        });
    }
915138
public function getGroupForUuid($uuid)
    {
        if (!$this->accessControlManager->hasAccessEntityForUuid(self::ACCESS_ENTITY_TYPE, $uuid)) {
            return false;
        }
        
        // Get the access entity
        $accessEntity = $this->accessControlManager->getAccessEntityForUuid(self::ACCESS_ENTITY_TYPE, $uuid);

        if ($accessEntity === false) {
            return false;
        }
        
        return $accessEntity;
    }
729557
public static function getDateTimeFromTimeuuidString($uuid)
    {
        $str = preg_replace("/[^a-f0-9]/is", "", $uuid); // delete non hexadecimal

        if (strlen($str) !== (self::UUID_LENGTH * 2)) {
            return null;
        }

        $bin = pack("H*", $str);

        if (ord($bin[6]) >> 4 == 1) {
            // Restore contiguous big-endian byte order
            $time = bin2hex($bin[6].$bin[7].$bin[4].$bin[5].$bin[0].$bin[1].$bin[2].$bin[3]);

            // Clear version flag
            $time[0] = "0";

            // Do some reverse arithmetic to get a Unix timestamp
            $time = (hexdec($time) - self::INTERVAL) / 10000000;

            // in case of bad uuid time can be negative
            if ($time < 0) {
                return null;
            }

            return \DateTime::createFromFormat('U', floor($time));
        }

        return null;
    }
1011753
public function getStep($uuid)
    {
        foreach ($this->steps as $step) {
            if ($step->getUuid() === $uuid) {
                return $step;
            }
        }

        return null;
    }
5826
@Override
	public CommerceOrder fetchCommerceOrderByUuidAndGroupId(String uuid,
		long groupId) {
		return commerceOrderPersistence.fetchByUUID_G(uuid, groupId);
	}
642818
@Override
	public CommerceOrder getCommerceOrderByUuidAndGroupId(String uuid,
		long groupId) throws PortalException {
		return commerceOrderPersistence.findByUUID_G(uuid, groupId);
	}
528528
public function getPathFromUuid($uuid, $checkIfExists = true)
    {
        if (null !== ($file = $this->framework->getAdapter(FilesModel::class)->findByUuid($uuid))) {
            if (!$checkIfExists) {
                return $file->path;
            }

            $a = $this->container->getParameter('kernel.project_dir');
            $b = $file->path;
            $path = $this->container->getParameter('kernel.project_dir').'/'.$file->path;

            if (file_exists($this->container->getParameter('kernel.project_dir').'/'.$file->path)) {
                return $file->path;
            }
        }

        return null;
    }
902669
public function findItemByUid(int $uid)
    {
        $queryBuilder = $this->getQueryBuilder();
        $indexQueueItemRecord = $queryBuilder
            ->select('*')
            ->from($this->table)
            ->where($queryBuilder->expr()->eq('uid', $uid))
            ->execute()->fetch();

        if (!isset($indexQueueItemRecord['uid'])) {
            return null;
        }

        /** @var Item $item*/
        $item = GeneralUtility::makeInstance(Item::class, /** @scrutinizer ignore-type */ $indexQueueItemRecord);
        return $item;
    }
1088814
public function getSelection($uuid)
    {
        foreach ($this->selections as $selection) {
            if ($selection->getUuid() === $uuid) {
                return $selection;
            }
        }
    }
1226735
public function getItem($id)
	{
		return array_key_exists($id, $this->ids) ? $this->ids[$id] : null;
	}
887353
public function findOrFailByUuid($uuid, $columns = ['*'])
    {
        $result = $this->findByUuid($uuid, $columns);

        if (is_array($uuid)) {
            if (count($result) == count(array_unique($uuid))) {
                return $result;
            }
        } elseif (! is_null($result)) {
            return $result;
        }

        throw new NotFoundHttpException('Resource \'' . class_basename(get_class($this->model)) . '\' with given UUID ' . $uuid . ' not found');
    }
519250
public function delete($uuid)
    {
        $model = static::$model::findOrFail($uuid);

        $this->authorizeUserAction('delete', $model);

        $deletedCount = $model->delete();

        if ($deletedCount < 1) {
            throw new NotFoundHttpException('Could not find a resource with that UUID to delete');
        }

        return $this->response->noContent()->setStatusCode(204);
    }
1002599
public function getChoice($uuid)
    {
        $found = null;
        foreach ($this->choices as $choice) {
            if ($choice->getUuid() === $uuid) {
                $found = $choice;
                break;
            }
        }

        return $found;
    }
876382
public function getReferences($uuid)
    {
        $session = $this->sessionManager->getSession();
        $node = $session->getNodeByIdentifier($uuid);

        return iterator_to_array($node->getReferences());
    }
1077362
public function orderAt($uuid, $position, $userId, $webspaceKey, $locale)
    {
        $document = $this->documentManager->find($uuid, $locale);

        $parentDocument = $this->inspector->getParent($document);
        $siblingDocuments = $this->inspector->getChildren($parentDocument);

        $siblings = array_values($siblingDocuments->toArray()); // get indexed array
        $countSiblings = count($siblings);
        $currentPosition = array_search($document, $siblings) + 1;

        if ($countSiblings < $position || $position <= 0) {
            throw new InvalidOrderPositionException(
                sprintf(
                    'Cannot order node "%s" at out-of-range position "%s", must be >= 0 && < %d"',
                    $this->inspector->getPath($document),
                    $position,
                    $countSiblings
                )
            );
        }

        if ($position === $countSiblings) {
            // move to the end
            $this->documentManager->reorder($document, null);
        } else {
            if ($currentPosition < $position) {
                $targetSibling = $siblings[$position];
            } elseif ($currentPosition > $position) {
                $targetSibling = $siblings[$position - 1];
            }

            $this->documentManager->reorder($document, $targetSibling->getUuid());
        }

        $this->documentManager->flush();

        return $this->documentToStructure($document);
    }
1076057
public function getContent(UuidInterface $uuid)
    {
        $formatter = self::$formatters[$uuid->getVersion()];

        return $formatter->getContent($uuid);
    }