‪TYPO3CMS  ‪main
BeforeSearchInDatabaseRecordProviderEvent.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 
21 
28 {
29  private array ‪$ignoredTables = [];
30 
31  public function ‪__construct(
32  private array $searchPageIds,
33  private ‪SearchDemand $searchDemand
34  ) {}
35 
36  public function ‪getSearchPageIds(): array
37  {
38  return $this->searchPageIds;
39  }
40 
41  public function ‪setSearchPageIds(array $searchPageIds): void
42  {
43  $this->searchPageIds = $searchPageIds;
44  }
45 
47  {
48  return $this->searchDemand;
49  }
50 
51  public function ‪setSearchDemand(‪SearchDemand $searchDemand): void
52  {
53  $this->searchDemand = $searchDemand;
54  }
55 
56  public function ‪ignoreTable(string $table): void
57  {
58  $this->ignoredTables[] = $table;
59  }
60 
61  public function ‪setIgnoredTables(array $tables): void
62  {
63  $this->ignoredTables = $tables;
64  }
65 
66  public function ‪isTableIgnored(string $table): bool
67  {
68  return in_array($table, $this->ignoredTables, true);
69  }
70 
74  public function ‪getIgnoredTables(): array
75  {
77  }
78 }
‪TYPO3\CMS\Backend\Search\Event\BeforeSearchInDatabaseRecordProviderEvent\getIgnoredTables
‪string[] getIgnoredTables()
Definition: BeforeSearchInDatabaseRecordProviderEvent.php:74
‪TYPO3\CMS\Backend\Search\Event\BeforeSearchInDatabaseRecordProviderEvent
Definition: BeforeSearchInDatabaseRecordProviderEvent.php:28
‪TYPO3\CMS\Backend\Search\Event\BeforeSearchInDatabaseRecordProviderEvent\setSearchDemand
‪setSearchDemand(SearchDemand $searchDemand)
Definition: BeforeSearchInDatabaseRecordProviderEvent.php:51
‪TYPO3\CMS\Backend\Search\Event\BeforeSearchInDatabaseRecordProviderEvent\setSearchPageIds
‪setSearchPageIds(array $searchPageIds)
Definition: BeforeSearchInDatabaseRecordProviderEvent.php:41
‪TYPO3\CMS\Backend\Search\Event\BeforeSearchInDatabaseRecordProviderEvent\ignoreTable
‪ignoreTable(string $table)
Definition: BeforeSearchInDatabaseRecordProviderEvent.php:56
‪TYPO3\CMS\Backend\Search\Event\BeforeSearchInDatabaseRecordProviderEvent\getSearchPageIds
‪getSearchPageIds()
Definition: BeforeSearchInDatabaseRecordProviderEvent.php:36
‪TYPO3\CMS\Backend\Search\LiveSearch\SearchDemand\SearchDemand
Definition: SearchDemand.php:29
‪TYPO3\CMS\Backend\Search\Event\BeforeSearchInDatabaseRecordProviderEvent\isTableIgnored
‪isTableIgnored(string $table)
Definition: BeforeSearchInDatabaseRecordProviderEvent.php:66
‪TYPO3\CMS\Backend\Search\Event\BeforeSearchInDatabaseRecordProviderEvent\__construct
‪__construct(private array $searchPageIds, private SearchDemand $searchDemand)
Definition: BeforeSearchInDatabaseRecordProviderEvent.php:31
‪TYPO3\CMS\Backend\Search\Event\BeforeSearchInDatabaseRecordProviderEvent\$ignoredTables
‪array $ignoredTables
Definition: BeforeSearchInDatabaseRecordProviderEvent.php:29
‪TYPO3\CMS\Backend\Search\Event\BeforeSearchInDatabaseRecordProviderEvent\setIgnoredTables
‪setIgnoredTables(array $tables)
Definition: BeforeSearchInDatabaseRecordProviderEvent.php:61
‪TYPO3\CMS\Backend\Search\Event
Definition: BeforeSearchInDatabaseRecordProviderEvent.php:18
‪TYPO3\CMS\Backend\Search\Event\BeforeSearchInDatabaseRecordProviderEvent\getSearchDemand
‪getSearchDemand()
Definition: BeforeSearchInDatabaseRecordProviderEvent.php:46