Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Core/Persistence/Legacy/URL/Query/CriterionHandler/SectionIdentifier.php
Go to the documentation of this file.
1 <?php
2
7 declare(strict_types=1);
8
9 namespace eZ\Publish\Core\Persistence\Legacy\URL\Query\CriterionHandler;
10
11 use eZ\Publish\API\Repository\Values\URL\Query\Criterion;
12 use eZ\Publish\Core\Persistence\Database\SelectQuery;
13 use eZ\Publish\Core\Persistence\Legacy\URL\Query\CriteriaConverter;
14
15 class SectionIdentifier extends Base
16 {
20 public function accept(Criterion $criterion): bool
21 {
22 return $criterion instanceof Criterion\SectionIdentifier;
23 }
24
28 public function handle(CriteriaConverter $converter, SelectQuery $query, Criterion $criterion): string
29 {
30 $this->joinContentObjectLink($query);
31 $this->joinContentObjectAttribute($query);
32 $this->joinContentObject($query);
33
34 if (strpos($query->getQuery(), 'INNER JOIN ezsection ') === false) {
35 $query->innerJoin(
36 'ezsection',
37 $query->expr->eq('ezcontentobject.section_id', 'ezsection.id')
38 );
39 }
40
41 return $query->expr->in('ezsection.identifier', $criterion->sectionIdentifiers);
42 }
43 }
eZ\Publish\API\Repository\Values\URL\Query\Criterion\SectionIdentifier
Matches URLs which used by content placed in specified section identifiers.
Definition: API/Repository/Values/URL/Query/Criterion/SectionIdentifier.php:15
eZ\Publish\API\Repository\Values\URL\Query\Criterion
Definition: API/Repository/Values/URL/Query/Criterion.php:10
eZ\Publish\Core\Persistence\Legacy\URL\Query\CriteriaConverter
Definition: Persistence/Legacy/URL/Query/CriteriaConverter.php:14
eZ\Publish\Core\Persistence\Legacy\URL\Query\CriterionHandler\Base
Definition: Persistence/Legacy/URL/Query/CriterionHandler/Base.php:15
eZ\Publish\Core\Persistence\Legacy\URL\Query\CriterionHandler\Base\joinContentObjectAttribute
joinContentObjectAttribute(SelectQuery $query)
Inner join ezcontentobject_attribute table if not joined yet.
Definition: Persistence/Legacy/URL/Query/CriterionHandler/Base.php:51
eZ\Publish\Core\Persistence\Legacy\URL\Query\CriterionHandler\Base\joinContentObjectLink
joinContentObjectLink(SelectQuery $query)
Inner join ezurl_object_link table if not joined yet.
Definition: Persistence/Legacy/URL/Query/CriterionHandler/Base.php:21
eZ\Publish\Core\Persistence\Legacy\URL\Query\CriterionHandler\Base\joinContentObject
joinContentObject(SelectQuery $query)
Inner join ezcontentobject table if not joined yet.
Definition: Persistence/Legacy/URL/Query/CriterionHandler/Base.php:36
eZ\Publish\Core\Persistence\Legacy\URL\Query\CriterionHandler\SectionIdentifier\accept
accept(Criterion $criterion)
{Check if this criterion handler accepts to handle the given criterion.bool}
Definition: Core/Persistence/Legacy/URL/Query/CriterionHandler/SectionIdentifier.php:20
eZ\Publish\Core\Persistence\Legacy\URL\Query\CriterionHandler\SectionIdentifier\handle
handle(CriteriaConverter $converter, SelectQuery $query, Criterion $criterion)
{Generate query expression for a Criterion this handler accepts.accept() must be called before callin...
Definition: Core/Persistence/Legacy/URL/Query/CriterionHandler/SectionIdentifier.php:28
eZ\Publish\Core\Persistence\Database\Query\getQuery
getQuery()
Return the SQL string for this query.
eZ\Publish\Core\Persistence\Database\SelectQuery
Definition: SelectQuery.php:16
eZ\Publish\Core\Persistence\Database\SelectQuery\innerJoin
innerJoin()
Returns the SQL for an inner join or prepares $fromString for an inner join.
eZ\Publish\API\Repository\Values\URL\Query\Criterion
Definition: API/Repository/Values/URL/Query/Criterion/LogicalAnd.php:7
eZ\Publish\Core\Persistence\Legacy\URL\Query\CriterionHandler
Definition: Persistence/Legacy/URL/Query/CriterionHandler/Base.php:9
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.