‪TYPO3CMS  ‪main
ModifyDefaultConstraintsForDatabaseQueryEvent.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 
23 
34 {
35  public function ‪__construct(
36  private readonly string $table,
37  private readonly string $tableAlias,
38  private readonly ‪ExpressionBuilder $expressionBuilder,
40  private array $constraints,
42  private readonly array $enableFieldsToIgnore,
43  private readonly ‪Context $context
44  ) {}
45 
46  public function ‪getTable(): string
47  {
48  return $this->table;
49  }
50 
51  public function ‪getTableAlias(): string
52  {
53  return $this->tableAlias;
54  }
55 
57  {
58  return $this->expressionBuilder;
59  }
60 
61  public function ‪getConstraints(): array
62  {
63  return $this->constraints;
64  }
65 
66  public function ‪setConstraints(array $constraints): void
67  {
68  $this->constraints = $constraints;
69  }
70 
71  public function ‪getEnableFieldsToIgnore(): array
72  {
73  return array_keys(array_filter($this->enableFieldsToIgnore));
74  }
75 
76  public function ‪getContext(): ‪Context
77  {
78  return $this->context;
79  }
80 }
‪TYPO3\CMS\Core\Domain\Event
Definition: AfterRecordLanguageOverlayEvent.php:18
‪TYPO3\CMS\Core\Database\Query\Expression\ExpressionBuilder
Definition: ExpressionBuilder.php:40
‪TYPO3\CMS\Core\Domain\Event\ModifyDefaultConstraintsForDatabaseQueryEvent\getContext
‪getContext()
Definition: ModifyDefaultConstraintsForDatabaseQueryEvent.php:76
‪TYPO3\CMS\Core\Domain\Event\ModifyDefaultConstraintsForDatabaseQueryEvent\getConstraints
‪getConstraints()
Definition: ModifyDefaultConstraintsForDatabaseQueryEvent.php:61
‪TYPO3\CMS\Core\Domain\Event\ModifyDefaultConstraintsForDatabaseQueryEvent\getTableAlias
‪getTableAlias()
Definition: ModifyDefaultConstraintsForDatabaseQueryEvent.php:51
‪TYPO3\CMS\Core\Context\Context
Definition: Context.php:54
‪TYPO3\CMS\Core\Domain\Event\ModifyDefaultConstraintsForDatabaseQueryEvent\getExpressionBuilder
‪getExpressionBuilder()
Definition: ModifyDefaultConstraintsForDatabaseQueryEvent.php:56
‪TYPO3\CMS\Core\Database\Query\Expression\CompositeExpression
Definition: CompositeExpression.php:27
‪TYPO3\CMS\Core\Domain\Event\ModifyDefaultConstraintsForDatabaseQueryEvent\setConstraints
‪setConstraints(array $constraints)
Definition: ModifyDefaultConstraintsForDatabaseQueryEvent.php:66
‪TYPO3\CMS\Core\Domain\Event\ModifyDefaultConstraintsForDatabaseQueryEvent\getTable
‪getTable()
Definition: ModifyDefaultConstraintsForDatabaseQueryEvent.php:46
‪TYPO3\CMS\Core\Domain\Event\ModifyDefaultConstraintsForDatabaseQueryEvent\getEnableFieldsToIgnore
‪getEnableFieldsToIgnore()
Definition: ModifyDefaultConstraintsForDatabaseQueryEvent.php:71
‪TYPO3\CMS\Core\Domain\Event\ModifyDefaultConstraintsForDatabaseQueryEvent
Definition: ModifyDefaultConstraintsForDatabaseQueryEvent.php:34
‪TYPO3\CMS\Core\Domain\Event\ModifyDefaultConstraintsForDatabaseQueryEvent\__construct
‪__construct(private readonly string $table, private readonly string $tableAlias, private readonly ExpressionBuilder $expressionBuilder, private array $constraints, private readonly array $enableFieldsToIgnore, private readonly Context $context)
Definition: ModifyDefaultConstraintsForDatabaseQueryEvent.php:35