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

Core/Search/Legacy/Content/Common/Gateway/SortClauseHandler/SectionName.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler;
8
9 use eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler;
10 use eZ\Publish\API\Repository\Values\Content\Query\SortClause;
11 use eZ\Publish\Core\Persistence\Database\SelectQuery;
12
16 class SectionName extends SortClauseHandler
17 {
25 public function accept(SortClause $sortClause)
26 {
27 return $sortClause instanceof SortClause\SectionName;
28 }
29
42 public function applySelect(SelectQuery $query, SortClause $sortClause, $number)
43 {
44 $query
45 ->select(
46 $query->alias(
47 $this->dbHandler->quoteColumn(
48 'name',
49 $this->getSortTableName($number)
50 ),
51 $column = $this->getSortColumnName($number)
52 )
53 );
54
55 return $column;
56 }
57
66 public function applyJoin(
67 SelectQuery $query,
68 SortClause $sortClause,
69 $number,
70 array $languageSettings
71 ) {
72 $table = $this->getSortTableName($number);
73 $query
74 ->leftJoin(
75 $query->alias(
76 $this->dbHandler->quoteTable('ezsection'),
77 $this->dbHandler->quoteIdentifier($table)
78 ),
79 $query->expr->eq(
80 $this->dbHandler->quoteColumn('id', $table),
81 $this->dbHandler->quoteColumn('section_id', 'ezcontentobject')
82 )
83 );
84 }
85 }
eZ\Publish\API\Repository\Values\Content\Query\SortClause\SectionName
Sets sort direction on Section name for a content query.
Definition: API/Repository/Values/Content/Query/SortClause/SectionName.php:16
eZ\Publish\API\Repository\Values\Content\Query\SortClause
This class is the base for SortClause classes, used to set sorting of content queries.
Definition: Content/Query/SortClause.php:16
eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler\SectionName\applySelect
applySelect(SelectQuery $query, SortClause $sortClause, $number)
Apply selects to the query.
Definition: Core/Search/Legacy/Content/Common/Gateway/SortClauseHandler/SectionName.php:42
eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler\SectionName\applyJoin
applyJoin(SelectQuery $query, SortClause $sortClause, $number, array $languageSettings)
Applies joins to the query, required to fetch sort data.
Definition: Core/Search/Legacy/Content/Common/Gateway/SortClauseHandler/SectionName.php:66
eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler\SectionName\accept
accept(SortClause $sortClause)
Check if this sort clause handler accepts to handle the given sort clause.
Definition: Core/Search/Legacy/Content/Common/Gateway/SortClauseHandler/SectionName.php:25
eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler
Handler for a single sort clause.
Definition: SortClauseHandler.php:17
eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler\getSortTableName
getSortTableName($number, $externalTableName=null)
Returns the sort table name.
Definition: SortClauseHandler.php:96
eZ\Publish\Core\Persistence\Database\SelectQuery
Definition: SelectQuery.php:16
eZ\Publish\Core\Persistence\Database\SelectQuery\leftJoin
leftJoin()
Returns the SQL for a left join or prepares $fromString for a left join.
eZ\Publish\Core\Persistence\Database\SelectQuery\alias
alias($name, $alias)
Returns SQL to create an alias.
eZ\Publish\Core\Persistence\Database\SelectQuery\select
select()
Opens the query and selects which columns you want to return with the query.
eZ\Publish\API\Repository\Values\Content\Query\SortClause
Definition: API/Repository/Values/Content/Query/SortClause/ContentId.php:7
eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler
Definition: Core/Search/Legacy/Content/Common/Gateway/SortClauseHandler/ContentId.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.