‪TYPO3CMS  ‪main
Typo3DbBackend.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
20 use Doctrine\DBAL\Exception as DBALException;
21 use Psr\Http\Message\ServerRequestInterface;
22 use TYPO3\CMS\Backend\Utility\BackendUtility;
28 use TYPO3\CMS\Core\Database\Query\QueryBuilder;
50 
56 {
60 
62  {
63  $this->cacheService = ‪$cacheService;
64  $this->reflectionService = ‪$reflectionService;
65  $this->connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
66  }
67 
77  public function ‪addRow(string $tableName, array $fieldValues, bool $isRelation = false): int
78  {
79  if (isset($fieldValues['uid'])) {
80  unset($fieldValues['uid']);
81  }
82  try {
83  $connection = $this->connectionPool->getConnectionForTable($tableName);
84  $connection->insert($tableName, $fieldValues);
85  } catch (DBALException $e) {
86  throw new ‪SqlErrorException($e->getPrevious()->getMessage(), 1470230766, $e);
87  }
88 
89  ‪$uid = 0;
90  if (!$isRelation) {
91  // Relation tables have no auto_increment column, so no retrieval must be tried.
92  ‪$uid = (int)$connection->lastInsertId();
93  $this->cacheService->clearCacheForRecord($tableName, ‪$uid);
94  }
95  return ‪$uid;
96  }
97 
107  public function ‪updateRow(string $tableName, array $fieldValues, bool $isRelation = false): void
108  {
109  if (!isset($fieldValues['uid'])) {
110  throw new \InvalidArgumentException('The given row must contain a value for "uid".', 1476045164);
111  }
112 
113  ‪$uid = (int)$fieldValues['uid'];
114  unset($fieldValues['uid']);
115 
116  try {
117  $connection = $this->connectionPool->getConnectionForTable($tableName);
118  $connection->update($tableName, $fieldValues, ['uid' => ‪$uid]);
119  } catch (DBALException $e) {
120  throw new ‪SqlErrorException($e->getPrevious()->getMessage(), 1470230767, $e);
121  }
122 
123  if (!$isRelation) {
124  $this->cacheService->clearCacheForRecord($tableName, ‪$uid);
125  }
126  }
127 
136  public function ‪updateRelationTableRow(string $tableName, array $fieldValues): void
137  {
138  if (!isset($fieldValues['uid_local']) && !isset($fieldValues['uid_foreign'])) {
139  throw new \InvalidArgumentException(
140  'The given fieldValues must contain a value for "uid_local" and "uid_foreign".',
141  1360500126
142  );
143  }
144 
145  $where = [];
146  $where['uid_local'] = (int)$fieldValues['uid_local'];
147  $where['uid_foreign'] = (int)$fieldValues['uid_foreign'];
148  unset($fieldValues['uid_local']);
149  unset($fieldValues['uid_foreign']);
150 
151  if (!empty($fieldValues['tablenames'])) {
152  $where['tablenames'] = $fieldValues['tablenames'];
153  unset($fieldValues['tablenames']);
154  }
155  if (!empty($fieldValues['fieldname'])) {
156  $where['fieldname'] = $fieldValues['fieldname'];
157  unset($fieldValues['fieldname']);
158  }
159 
160  try {
161  $this->connectionPool->getConnectionForTable($tableName)->update($tableName, $fieldValues, $where);
162  } catch (DBALException $e) {
163  throw new ‪SqlErrorException($e->getPrevious()->getMessage(), 1470230768, $e);
164  }
165  }
166 
175  public function ‪removeRow(string $tableName, array $where, bool $isRelation = false): void
176  {
177  try {
178  $this->connectionPool->getConnectionForTable($tableName)->delete($tableName, $where);
179  } catch (DBALException $e) {
180  throw new ‪SqlErrorException($e->getPrevious()->getMessage(), 1470230769, $e);
181  }
182 
183  if (!$isRelation && isset($where['uid'])) {
184  $this->cacheService->clearCacheForRecord($tableName, (int)$where['uid']);
185  }
186  }
187 
193  public function ‪getObjectDataByQuery(‪QueryInterface $query): array
194  {
195  $statement = $query->‪getStatement();
196  // todo: remove instanceof checks as soon as getStatement() strictly returns Qom\Statement only
197  if ($statement instanceof ‪Statement
198  && !$statement->‪getStatement() instanceof QueryBuilder
199  ) {
200  $rows = $this->‪getObjectDataByRawQuery($statement);
201  } else {
202  $queryParser = GeneralUtility::makeInstance(Typo3DbQueryParser::class);
203  if ($statement instanceof ‪Statement
204  && $statement->‪getStatement() instanceof QueryBuilder
205  ) {
206  $queryBuilder = $statement->getStatement();
207  } else {
208  $queryBuilder = $queryParser->convertQueryToDoctrineQueryBuilder($query);
209  }
210  $selectParts = $queryBuilder->getSelect();
211  if ($queryParser->isDistinctQuerySuggested() && !empty($selectParts)) {
212  $selectParts[0] = 'DISTINCT ' . $selectParts[0];
213  $queryBuilder->selectLiteral(...$selectParts);
214  }
215  if ($query->‪getOffset()) {
216  $queryBuilder->setFirstResult($query->‪getOffset());
217  }
218  if ($query->‪getLimit()) {
219  $queryBuilder->setMaxResults($query->‪getLimit());
220  }
221  try {
222  $rows = $queryBuilder->executeQuery()->fetchAllAssociative();
223  } catch (DBALException $e) {
224  throw new ‪SqlErrorException($e->getPrevious()->getMessage(), 1472074485, $e);
225  }
226  }
227 
228  if (!empty($rows)) {
229  $rows = $this->‪overlayLanguageAndWorkspace($query->‪getSource(), $rows, $query);
230  }
231 
232  return $rows;
233  }
234 
240  protected function ‪getObjectDataByRawQuery(‪Statement $statement): array
241  {
242  $realStatement = $statement->‪getStatement();
243  $parameters = $statement->‪getBoundVariables();
244 
245  // The real statement is an instance of the Doctrine DBAL QueryBuilder, so fetching
246  // this directly is possible
247  if ($realStatement instanceof QueryBuilder) {
248  try {
249  $result = $realStatement->executeQuery();
250  } catch (DBALException $e) {
251  throw new ‪SqlErrorException($e->getPrevious()->getMessage(), 1472064721, $e);
252  }
253  $rows = $result->fetchAllAssociative();
254  // Prepared Doctrine DBAL statement
255  } elseif ($realStatement instanceof \Doctrine\DBAL\‪Statement) {
256  try {
257  foreach ($parameters as $parameterIdentifier => $parameterValue) {
258  $realStatement->bindValue($parameterIdentifier, $parameterValue);
259  }
260  $result = $realStatement->executeQuery();
261  } catch (DBALException $e) {
262  throw new ‪SqlErrorException($e->getPrevious()->getMessage(), 1481281404, $e);
263  }
264  $rows = $result->fetchAllAssociative();
265  } else {
266  // Do a real raw query. This is very stupid, as it does not allow to use DBAL's real power if
267  // several tables are on different databases, so this is used with caution and could be removed
268  // in the future
269  try {
270  $connection = $this->connectionPool->getConnectionByName(‪ConnectionPool::DEFAULT_CONNECTION_NAME);
271  $statement = $connection->executeQuery($realStatement, $parameters);
272  } catch (DBALException $e) {
273  throw new ‪SqlErrorException($e->getPrevious()->getMessage(), 1472064775, $e);
274  }
275 
276  $rows = $statement->fetchAllAssociative();
277  }
278 
279  return $rows;
280  }
281 
289  public function ‪getObjectCountByQuery(‪QueryInterface $query): int
290  {
291  if ($query->‪getConstraint() instanceof ‪Statement) {
292  throw new ‪BadConstraintException('Could not execute count on queries with a constraint of type TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\Statement', 1256661045);
293  }
294 
295  $statement = $query->‪getStatement();
296  if ($statement instanceof ‪Statement
297  && !$statement->‪getStatement() instanceof QueryBuilder
298  ) {
299  $rows = $this->‪getObjectDataByQuery($query);
300  $count = count($rows);
301  } else {
302  $queryParser = GeneralUtility::makeInstance(Typo3DbQueryParser::class);
303  $queryBuilder = $queryParser
304  ->convertQueryToDoctrineQueryBuilder($query)
305  ->resetOrderBy();
306 
307  if ($queryParser->isDistinctQuerySuggested()) {
308  $source = $queryBuilder->getFrom()[0];
309  // Tablename is already quoted for the DBMS, we need to treat table and field names separately
310  $tableName = $source->alias ?: $source->table;
311  $fieldName = $queryBuilder->quoteIdentifier('uid');
312  $queryBuilder
313  ->resetGroupBy()
314  ->selectLiteral(sprintf('COUNT(DISTINCT %s.%s)', $tableName, $fieldName));
315  } else {
316  $queryBuilder->count('*');
317  }
318  // Ensure to count only records in the current workspace
319  $context = GeneralUtility::makeInstance(Context::class);
320  $workspaceUid = (int)$context->getPropertyFromAspect('workspace', 'id');
321  $queryBuilder->getRestrictions()->add(GeneralUtility::makeInstance(WorkspaceRestriction::class, $workspaceUid));
322 
323  try {
324  $count = $queryBuilder->executeQuery()->fetchOne();
325  } catch (DBALException $e) {
326  throw new ‪SqlErrorException($e->getPrevious()->getMessage(), 1472074379, $e);
327  }
328  if ($query->‪getOffset()) {
329  $count -= $query->‪getOffset();
330  }
331  if ($query->‪getLimit()) {
332  $count = min($count, $query->‪getLimit());
333  }
334  }
335  return (int)max(0, $count);
336  }
337 
346  {
347  $className = get_class($object);
349  $dataMapper = GeneralUtility::makeInstance(DataMapper::class);
350  $dataMap = $dataMapper->getDataMap($className);
351  $tableName = $dataMap->getTableName();
352  $queryBuilder = $this->connectionPool->getQueryBuilderForTable($tableName);
353  if ((‪$GLOBALS['TYPO3_REQUEST'] ?? null) instanceof ServerRequestInterface
354  && ‪ApplicationType::fromRequest(‪$GLOBALS['TYPO3_REQUEST'])->isFrontend()
355  ) {
356  $queryBuilder->setRestrictions(GeneralUtility::makeInstance(FrontendRestrictionContainer::class));
357  }
358  $whereClause = [];
359  // loop over all properties of the object to exactly set the values of each database field
360  $classSchema = $this->reflectionService->getClassSchema($className);
361  foreach ($classSchema->getDomainObjectProperties() as $property) {
362  $propertyName = $property->getName();
363  // @todo We couple the Backend to the Entity implementation (uid, isClone); changes there breaks this method
364  if ($dataMap->isPersistableProperty($propertyName) && $propertyName !== ‪AbstractDomainObject::PROPERTY_UID && $propertyName !== ‪AbstractDomainObject::PROPERTY_PID && $propertyName !== 'isClone') {
365  $propertyValue = $object->‪_getProperty($propertyName);
366  $fieldName = $dataMap->getColumnMap($propertyName)->getColumnName();
367  if ($propertyValue === null) {
368  $whereClause[] = $queryBuilder->expr()->isNull($fieldName);
369  } else {
370  $whereClause[] = $queryBuilder->expr()->eq($fieldName, $queryBuilder->createNamedParameter($dataMapper->getPlainValue($propertyValue)));
371  }
372  }
373  }
374  $queryBuilder
375  ->select('uid')
376  ->from($tableName)
377  ->where(...$whereClause);
378 
379  try {
380  ‪$uid = (int)$queryBuilder
381  ->executeQuery()
382  ->fetchOne();
383  if (‪$uid > 0) {
384  return ‪$uid;
385  }
386  return null;
387  } catch (DBALException $e) {
388  throw new ‪SqlErrorException($e->getPrevious()->getMessage(), 1470231748, $e);
389  }
390  }
391 
400  protected function ‪overlayLanguageAndWorkspace(‪SourceInterface $source, array $rows, ‪QueryInterface $query, ?int $workspaceUid = null): array
401  {
402  // A custom query is needed for the language, so a custom context is cloned
403  $context = clone GeneralUtility::makeInstance(Context::class);
404  $context->setAspect('language', $query->‪getQuerySettings()->‪getLanguageAspect());
405  if ($workspaceUid === null) {
406  $workspaceUid = (int)$context->getPropertyFromAspect('workspace', 'id');
407  } else {
408  $context->setAspect('workspace', GeneralUtility::makeInstance(WorkspaceAspect::class, $workspaceUid));
409  }
410 
411  $pageRepository = GeneralUtility::makeInstance(PageRepository::class, $context);
412  if ($source instanceof ‪SelectorInterface) {
413  $tableName = $source->getSelectorName();
414  $rows = $this->‪resolveMovedRecordsInWorkspace($tableName, $rows, $workspaceUid);
415  return $this->‪overlayLanguageAndWorkspaceForSelect($tableName, $rows, $pageRepository, $query);
416  }
417  if ($source instanceof ‪JoinInterface) {
418  $tableName = $source->getRight()->getSelectorName();
419  // Special handling of joined select is only needed when doing workspace overlays, which does not happen
420  // in live workspace
421  if ($workspaceUid === 0) {
422  return $this->‪overlayLanguageAndWorkspaceForSelect($tableName, $rows, $pageRepository, $query);
423  }
424  return $this->‪overlayLanguageAndWorkspaceForJoinedSelect($tableName, $rows, $pageRepository, $query);
425  }
426  // No proper source, so we do not have a table name here
427  // we cannot do an overlay and return the original rows instead.
428  return $rows;
429  }
430 
436  protected function ‪overlayLanguageAndWorkspaceForSelect(string $tableName, array $rows, ‪PageRepository $pageRepository, ‪QueryInterface $query): array
437  {
438  $overlaidRows = [];
439  foreach ($rows as $row) {
440  $row = $this->‪overlayLanguageAndWorkspaceForSingleRecord($tableName, $row, $pageRepository, $query);
441  if (is_array($row)) {
442  $overlaidRows[] = $row;
443  }
444  }
445  return $overlaidRows;
446  }
447 
455  protected function ‪overlayLanguageAndWorkspaceForJoinedSelect(string $tableName, array $rows, ‪PageRepository $pageRepository, ‪QueryInterface $query): array
456  {
457  // No valid rows, so this is skipped
458  if (!isset($rows[0]['uid'])) {
459  return $rows;
460  }
461  // First, find out the fields that belong to the "main" selected table which is defined by TCA, and take the first
462  // record to find out all possible fields in this database table
463  $fieldsOfMainTable = $pageRepository->‪getRawRecord($tableName, (int)$rows[0]['uid']);
464  $overlaidRows = [];
465  if (is_array($fieldsOfMainTable)) {
466  foreach ($rows as $row) {
467  $mainRow = array_intersect_key($row, $fieldsOfMainTable);
468  $joinRow = array_diff_key($row, $mainRow);
469  $mainRow = $this->‪overlayLanguageAndWorkspaceForSingleRecord($tableName, $mainRow, $pageRepository, $query);
470  if (is_array($mainRow)) {
471  $overlaidRows[] = array_replace($joinRow, $mainRow);
472  }
473  }
474  }
475  return $overlaidRows;
476  }
477 
483  protected function ‪overlayLanguageAndWorkspaceForSingleRecord(string $tableName, array $row, ‪PageRepository $pageRepository, ‪QueryInterface $query)
484  {
485  $querySettings = $query->‪getQuerySettings();
486  $languageAspect = $querySettings->‪getLanguageAspect();
487  $languageUid = $languageAspect->getContentId();
488  // If current row is a translation select its parent
489  $languageOfCurrentRecord = 0;
490  if ((‪$GLOBALS['TCA'][$tableName]['ctrl']['languageField'] ?? null)
491  && ($row[‪$GLOBALS['TCA'][$tableName]['ctrl']['languageField']] ?? false)
492  ) {
493  $languageOfCurrentRecord = $row[‪$GLOBALS['TCA'][$tableName]['ctrl']['languageField']];
494  }
495  // Note #1: In case of ->findByUid([uid-of-translated-record]) the translated record should be fetched at all times
496  // Example: you've fetched a translation directly via findByUid(11) which is a translated record, but the
497  // request was to do overlays. In this case, the default record is loaded again, and then reapplied again.
498  // Note #2: We cannot use $languageAspect->doOverlays() as it also checks for ID > 0
499  $fetchLocalizedRecord = $languageAspect->getOverlayType() !== ‪LanguageAspect::OVERLAYS_OFF;
500  // We have a translated record from the DB, but we do overlays, so let's take the default language record
501  // and do overlays again later-on
502  if ($languageOfCurrentRecord > 0
503  && $fetchLocalizedRecord
504  && isset(‪$GLOBALS['TCA'][$tableName]['ctrl']['transOrigPointerField'])
505  && ($row[‪$GLOBALS['TCA'][$tableName]['ctrl']['transOrigPointerField']] ?? 0) > 0
506  ) {
507  $row = $pageRepository->‪getRawRecord(
508  $tableName,
509  (int)$row[‪$GLOBALS['TCA'][$tableName]['ctrl']['transOrigPointerField']]
510  );
511  $languageUid = $languageOfCurrentRecord;
512  }
513 
514  // Handle workspace overlays
515  $pageRepository->‪versionOL($tableName, $row, true, $querySettings->getIgnoreEnableFields());
516  if (is_array($row) && $fetchLocalizedRecord) {
517  if ($tableName === 'pages') {
518  $row = $pageRepository->‪getLanguageOverlay($tableName, $row);
519  } else {
520  if (!$querySettings->getRespectSysLanguage()
521  && $languageOfCurrentRecord > 0
522  && (!$query instanceof ‪Query || !$query->getParentQuery())
523  ) {
524  // No parent query means we're processing the aggregate root.
525  // respectSysLanguage is false which means that records returned by the query
526  // might be from different languages (which is desired).
527  // So we must set the language used for overlay to the language of the current record
528  $languageUid = $languageOfCurrentRecord;
529  }
530  if (isset(‪$GLOBALS['TCA'][$tableName]['ctrl']['transOrigPointerField'])
531  && ($row[‪$GLOBALS['TCA'][$tableName]['ctrl']['transOrigPointerField']] ?? 0) > 0
532  && $languageOfCurrentRecord > 0
533  ) {
534  // Force overlay by faking default language record, as getRecordOverlay can only handle default language records
535  $row['uid'] = $row[‪$GLOBALS['TCA'][$tableName]['ctrl']['transOrigPointerField']];
536  $row[‪$GLOBALS['TCA'][$tableName]['ctrl']['languageField']] = 0;
537  }
538  // Currently this needs to return the default record (OVERLAYS_MIXED) if no translation is found
539  //however this is a hack and should actually use the overlay functionality as given in the original LanguageAspect.
540  $customLanguageAspect = new ‪LanguageAspect($languageUid, $languageUid, ‪LanguageAspect::OVERLAYS_MIXED, $languageAspect->getFallbackChain());
541  $row = $pageRepository->‪getLanguageOverlay($tableName, $row, $customLanguageAspect);
542  }
543  } elseif (is_array($row)) {
544  // If an already localized record is fetched, the "uid" of the default language is used
545  // as the record is re-fetched in the DataMapper
546  if (isset(‪$GLOBALS['TCA'][$tableName]['ctrl']['transOrigPointerField'])
547  && ($row[‪$GLOBALS['TCA'][$tableName]['ctrl']['transOrigPointerField']] ?? 0) > 0
548  && $languageOfCurrentRecord > 0
549  ) {
550  $row['_LOCALIZED_UID'] = (int)$row['uid'];
551  $row['uid'] = $row[‪$GLOBALS['TCA'][$tableName]['ctrl']['transOrigPointerField']];
552  }
553  }
554  return $row;
555  }
556 
564  protected function ‪resolveMovedRecordsInWorkspace(string $tableName, array $rows, int $workspaceUid): array
565  {
566  if ($workspaceUid === 0) {
567  return $rows;
568  }
569  if (!BackendUtility::isTableWorkspaceEnabled($tableName)) {
570  return $rows;
571  }
572  if (count($rows) !== 1) {
573  return $rows;
574  }
575  $queryBuilder = $this->connectionPool->getQueryBuilderForTable($tableName);
576  $queryBuilder->getRestrictions()->removeAll();
577  $movedRecords = $queryBuilder
578  ->select('*')
579  ->from($tableName)
580  ->where(
581  $queryBuilder->expr()->eq('t3ver_state', $queryBuilder->createNamedParameter(VersionState::MOVE_POINTER->value, ‪Connection::PARAM_INT)),
582  $queryBuilder->expr()->eq('t3ver_wsid', $queryBuilder->createNamedParameter($workspaceUid, ‪Connection::PARAM_INT)),
583  $queryBuilder->expr()->eq('t3ver_oid', $queryBuilder->createNamedParameter($rows[0]['uid'], ‪Connection::PARAM_INT))
584  )
585  ->setMaxResults(1)
586  ->executeQuery()
587  ->fetchAllAssociative();
588  if (!empty($movedRecords)) {
589  $rows = $movedRecords;
590  }
591  return $rows;
592  }
593 }
‪TYPO3\CMS\Extbase\Persistence\QueryInterface\getConstraint
‪ConstraintInterface null getConstraint()
‪TYPO3\CMS\Core\Domain\Repository\PageRepository\getRawRecord
‪array null getRawRecord(string $table, int $uid, array $fields=[' *'])
Definition: PageRepository.php:1400
‪TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface\getLanguageAspect
‪getLanguageAspect()
‪TYPO3\CMS\Core\Database\Connection\PARAM_INT
‪const PARAM_INT
Definition: Connection.php:52
‪TYPO3\CMS\Extbase\Persistence\QueryInterface\getLimit
‪int getLimit()
‪TYPO3\CMS\Core\Context\WorkspaceAspect
Definition: WorkspaceAspect.php:31
‪TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbBackend
Definition: Typo3DbBackend.php:56
‪TYPO3\CMS\Extbase\Persistence\QueryInterface\getOffset
‪int getOffset()
‪TYPO3\CMS\Core\Context\LanguageAspect\OVERLAYS_MIXED
‪const OVERLAYS_MIXED
Definition: LanguageAspect.php:75
‪TYPO3\CMS\Extbase\Persistence\Generic\Qom\Statement\getStatement
‪string Doctrine DBAL Statement TYPO3 CMS Core Database Query QueryBuilder getStatement()
Definition: Statement.php:52
‪TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbBackend\$cacheService
‪CacheService $cacheService
Definition: Typo3DbBackend.php:59
‪TYPO3\CMS\Extbase\Persistence\QueryInterface
Definition: QueryInterface.php:30
‪TYPO3\CMS\Core\Versioning\VersionState
‪VersionState
Definition: VersionState.php:22
‪TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbBackend\overlayLanguageAndWorkspaceForSingleRecord
‪array int mixed null overlayLanguageAndWorkspaceForSingleRecord(string $tableName, array $row, PageRepository $pageRepository, QueryInterface $query)
Definition: Typo3DbBackend.php:483
‪TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbBackend\overlayLanguageAndWorkspaceForJoinedSelect
‪overlayLanguageAndWorkspaceForJoinedSelect(string $tableName, array $rows, PageRepository $pageRepository, QueryInterface $query)
Definition: Typo3DbBackend.php:455
‪TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbBackend\updateRelationTableRow
‪updateRelationTableRow(string $tableName, array $fieldValues)
Definition: Typo3DbBackend.php:136
‪TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbBackend\getUidOfAlreadyPersistedValueObject
‪int null getUidOfAlreadyPersistedValueObject(AbstractValueObject $object)
Definition: Typo3DbBackend.php:345
‪TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbBackend\removeRow
‪removeRow(string $tableName, array $where, bool $isRelation=false)
Definition: Typo3DbBackend.php:175
‪TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbBackend\__construct
‪__construct(CacheService $cacheService, ReflectionService $reflectionService)
Definition: Typo3DbBackend.php:61
‪TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\_getProperty
‪_getProperty(string $propertyName)
Definition: AbstractDomainObject.php:131
‪TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\PROPERTY_PID
‪const PROPERTY_PID
Definition: AbstractDomainObject.php:33
‪TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbBackend\overlayLanguageAndWorkspace
‪overlayLanguageAndWorkspace(SourceInterface $source, array $rows, QueryInterface $query, ?int $workspaceUid=null)
Definition: Typo3DbBackend.php:400
‪TYPO3\CMS\Extbase\Persistence\Generic\Qom\SourceInterface
Definition: SourceInterface.php:23
‪TYPO3\CMS\Extbase\Persistence\QueryInterface\getQuerySettings
‪QuerySettingsInterface getQuerySettings()
‪TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper
Definition: DataMapper.php:60
‪TYPO3\CMS\Extbase\Persistence\Generic\Qom\Statement
Definition: Statement.php:26
‪TYPO3\CMS\Core\Context\Context
Definition: Context.php:54
‪TYPO3\CMS\Core\Database\ConnectionPool\DEFAULT_CONNECTION_NAME
‪const DEFAULT_CONNECTION_NAME
Definition: ConnectionPool.php:50
‪TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbBackend\addRow
‪int addRow(string $tableName, array $fieldValues, bool $isRelation=false)
Definition: Typo3DbBackend.php:77
‪TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbBackend\$reflectionService
‪ReflectionService $reflectionService
Definition: Typo3DbBackend.php:58
‪TYPO3\CMS\Extbase\Reflection\ReflectionService
Definition: ReflectionService.php:28
‪TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbBackend\getObjectCountByQuery
‪int getObjectCountByQuery(QueryInterface $query)
Definition: Typo3DbBackend.php:289
‪TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbBackend\overlayLanguageAndWorkspaceForSelect
‪overlayLanguageAndWorkspaceForSelect(string $tableName, array $rows, PageRepository $pageRepository, QueryInterface $query)
Definition: Typo3DbBackend.php:436
‪TYPO3\CMS\Core\Domain\Repository\PageRepository\versionOL
‪versionOL(string $table, &$row, bool $unsetMovePointers=false, bool $bypassEnableFieldsCheck=false)
Definition: PageRepository.php:1659
‪TYPO3\CMS\Extbase\Persistence\QueryInterface\getSource
‪TYPO3 CMS Extbase Persistence Generic Qom SourceInterface getSource()
‪TYPO3\CMS\Extbase\Persistence\Generic\Qom\SelectorInterface
Definition: SelectorInterface.php:32
‪TYPO3\CMS\Extbase\Persistence\Generic\Storage\Exception\SqlErrorException
Definition: SqlErrorException.php:25
‪TYPO3\CMS\Extbase\DomainObject\AbstractValueObject
Definition: AbstractValueObject.php:26
‪TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbBackend\getObjectDataByRawQuery
‪getObjectDataByRawQuery(Statement $statement)
Definition: Typo3DbBackend.php:240
‪TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject
Definition: AbstractDomainObject.php:31
‪TYPO3\CMS\Extbase\Persistence\QueryInterface\getStatement
‪TYPO3 CMS Extbase Persistence Generic Qom Statement getStatement()
‪TYPO3\CMS\Extbase\Persistence\Generic\Storage
Definition: BackendInterface.php:18
‪TYPO3\CMS\Core\Domain\Repository\PageRepository\getLanguageOverlay
‪array null getLanguageOverlay(string $table, array $originalRow, ?LanguageAspect $languageAspect=null)
Definition: PageRepository.php:340
‪TYPO3\CMS\Extbase\Persistence\Generic\Qom\JoinInterface
Definition: JoinInterface.php:24
‪TYPO3\CMS\Extbase\Persistence\Generic\Storage\Exception\BadConstraintException
Definition: BadConstraintException.php:25
‪TYPO3\CMS\Core\Context\LanguageAspect
Definition: LanguageAspect.php:57
‪TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbBackend\resolveMovedRecordsInWorkspace
‪resolveMovedRecordsInWorkspace(string $tableName, array $rows, int $workspaceUid)
Definition: Typo3DbBackend.php:564
‪TYPO3\CMS\Extbase\Persistence\Generic\Qom
Definition: AndInterface.php:16
‪TYPO3\CMS\Core\Database\Connection
Definition: Connection.php:41
‪TYPO3\CMS\Webhooks\Message\$uid
‪identifier readonly int $uid
Definition: PageModificationMessage.php:35
‪TYPO3\CMS\Core\SingletonInterface
Definition: SingletonInterface.php:22
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:25
‪TYPO3\CMS\Extbase\Service\CacheService
Definition: CacheService.php:34
‪TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbBackend\updateRow
‪updateRow(string $tableName, array $fieldValues, bool $isRelation=false)
Definition: Typo3DbBackend.php:107
‪TYPO3\CMS\Extbase\Persistence\Generic\Query
Definition: Query.php:43
‪TYPO3\CMS\Core\Context\LanguageAspect\OVERLAYS_OFF
‪const OVERLAYS_OFF
Definition: LanguageAspect.php:74
‪TYPO3\CMS\Core\Http\fromRequest
‪@ fromRequest
Definition: ApplicationType.php:66
‪TYPO3\CMS\Core\Domain\Repository\PageRepository
Definition: PageRepository.php:69
‪TYPO3\CMS\Core\Database\ConnectionPool
Definition: ConnectionPool.php:46
‪TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\PROPERTY_UID
‪const PROPERTY_UID
Definition: AbstractDomainObject.php:32
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:52
‪TYPO3\CMS\Extbase\Persistence\Generic\Storage\BackendInterface
Definition: BackendInterface.php:27
‪TYPO3\CMS\Core\Database\Query\Restriction\FrontendRestrictionContainer
Definition: FrontendRestrictionContainer.php:30
‪TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbBackend\getObjectDataByQuery
‪getObjectDataByQuery(QueryInterface $query)
Definition: Typo3DbBackend.php:193
‪TYPO3\CMS\Core\Http\ApplicationType
‪ApplicationType
Definition: ApplicationType.php:55
‪TYPO3\CMS\Extbase\Persistence\Generic\Qom\Statement\getBoundVariables
‪array getBoundVariables()
Definition: Statement.php:62
‪TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbBackend\$connectionPool
‪ConnectionPool $connectionPool
Definition: Typo3DbBackend.php:57
‪TYPO3\CMS\Core\Database\Query\Restriction\WorkspaceRestriction
Definition: WorkspaceRestriction.php:39