2 declare(strict_types = 1);
37 return GeneralUtility::makeInstance(
59 $pageId = $pageId ?? $data[
'pid'] ??
null;
60 $recordId = $recordId ?? $data[
'uid'] ??
null;
64 $context = GeneralUtility::makeInstance(EntityContext::class)
65 ->withWorkspaceId($aspectFieldValues[
'workspace'])
66 ->withLanguageId($aspectFieldValues[
'language']);
71 $target = GeneralUtility::makeInstance(
88 'workspace' =>
't3ver_wsid',
89 'versionParent' =>
't3ver_oid',
103 function ($aspectFieldName) use ($data) {
104 return (
int)($data[$aspectFieldName] ?? 0);
116 if (!empty($aspectFieldNames[
'languageSource'])) {
117 $languageSourceLink = GeneralUtility::makeInstance(
118 EntityPointerLink::class,
123 if (!empty($aspectFieldNames[
'languageParent'])) {
124 $languageParentLink = GeneralUtility::makeInstance(
125 EntityPointerLink::class,
130 if (empty($languageSourceLink) || empty($languageParentLink)
131 || $languageSourceLink->getSubject()->isEqualTo(
132 $languageParentLink->getSubject()
135 return $languageSourceLink ?? $languageParentLink ??
null;
137 return $languageSourceLink->withAncestor($languageParentLink);
146 if (!empty($aspectFieldNames[
'versionParent'])) {
147 return GeneralUtility::makeInstance(
148 EntityPointerLink::class,
163 if ($identifier ===
null) {
164 throw new \LogicException(
165 'Cannot create null pointer',
170 $identifier = (string)$identifier;
172 return GeneralUtility::makeInstance(
173 EntityUidPointer::class,