2 declare(strict_types = 1);
76 ->from(
'sys_redirect')
77 ->orderBy(
'source_host')
78 ->addOrderBy(
'source_path');
81 if ($this->demand->hasSourceHost()) {
82 $constraints[] =$queryBuilder->expr()->eq(
84 $queryBuilder->createNamedParameter($this->demand->getSourceHost(), \PDO::PARAM_STR)
88 if ($this->demand->hasSourcePath()) {
89 $escapedLikeString =
'%' . $queryBuilder->escapeLikeWildcards($this->demand->getSourcePath()) .
'%';
90 $constraints[] = $queryBuilder->expr()->like(
92 $queryBuilder->createNamedParameter($escapedLikeString, \PDO::PARAM_STR)
96 if ($this->demand->hasTarget()) {
97 $escapedLikeString =
'%' . $queryBuilder->escapeLikeWildcards($this->demand->getTarget()) .
'%';
98 $constraints[] = $queryBuilder->expr()->like(
100 $queryBuilder->createNamedParameter($escapedLikeString, \PDO::PARAM_STR)
104 if ($this->demand->hasStatusCode()) {
105 $constraints[] =$queryBuilder->expr()->eq(
107 $queryBuilder->createNamedParameter($this->demand->getStatusCode(), \PDO::PARAM_INT)
111 if (!empty($constraints)) {
112 $queryBuilder->where(...$constraints);
114 return $queryBuilder;
125 ->
select(
'source_host as name')
126 ->
from(
'sys_redirect')
141 ->
select(
'target_statuscode as code')
142 ->
from(
'sys_redirect')
154 $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable(
'sys_redirect');
157 ->
add(GeneralUtility::makeInstance(DeletedRestriction::class));
158 return $queryBuilder;