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

Core/Persistence/Legacy/URL/Query/CriterionHandler/VisibleOnly.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\Persistence\Legacy\URL\Query\CriterionHandler;
8
9 use Doctrine\DBAL\ParameterType;
10 use eZ\Publish\API\Repository\Values\URL\Query\Criterion;
11 use eZ\Publish\Core\Persistence\Database\SelectQuery;
12 use eZ\Publish\Core\Persistence\Legacy\URL\Query\CriteriaConverter;
13
14 class VisibleOnly extends Base
15 {
19 public function accept(Criterion $criterion)
20 {
21 return $criterion instanceof Criterion\VisibleOnly;
22 }
23
27 public function handle(CriteriaConverter $converter, SelectQuery $query, Criterion $criterion)
28 {
29 $this->joinContentObjectLink($query);
30 $this->joinContentObjectAttribute($query);
31
32 $currentQuery = $query->getQuery();
33 if (strpos($currentQuery, 'INNER JOIN ezcontentobject_tree') === false) {
34 $query->innerJoin('ezcontentobject_tree', $query->expr->lAnd(
35 $query->expr->eq(
36 'ezcontentobject_tree.contentobject_id',
37 'ezcontentobject_attribute.contentobject_id'
38 ),
39 $query->expr->eq(
40 'ezcontentobject_tree.contentobject_version',
41 'ezcontentobject_attribute.version'
42 )
43 ));
44 }
45
46 return $query->expr->eq(
47 'ezcontentobject_tree.is_invisible',
48 $query->bindValue(0, null, ParameterType::INTEGER)
49 );
50 }
51 }
eZ\Publish\API\Repository\Values\URL\Query\Criterion\VisibleOnly
Matches URLs which are used in published content.
Definition: API/Repository/Values/URL/Query/Criterion/VisibleOnly.php:13
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\VisibleOnly\accept
accept(Criterion $criterion)
{Check if this criterion handler accepts to handle the given criterion.bool}
Definition: Core/Persistence/Legacy/URL/Query/CriterionHandler/VisibleOnly.php:19
eZ\Publish\Core\Persistence\Legacy\URL\Query\CriterionHandler\VisibleOnly\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/VisibleOnly.php:27
eZ\Publish\Core\Persistence\Database\Query\bindValue
bindValue($value, $placeHolder=null, $type=PDO::PARAM_STR)
Binds the value $value to the specified variable name $placeHolder.
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+.