Feature: #71911 - Add constraint hook in DatabaseRecordList->makeSearchString¶
See forge#71911
Description¶
A newly introduced hook in Database
allows to modify the constraints which are applied to
the search string.
Example¶
An example implementation could look like this:
EXT:
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][\TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::class]['makeSearchStringConstraints'][1313131313] =
\MyVendor\MySite\Hooks\DatabaseRecordListHook::class;
Copied!
EXT:
namespace MyVendor\MySite\Hooks;
class DatabaseRecordListHook
{
public function makeSearchStringConstraints(
\TYPO3\CMS\Core\Database\Query\QueryBuilder $queryBuilder
array $constraints,
string $searchString,
string $table,
int $currentPid,
) {
return $constraints;
}
}
Copied!