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

Publish/Core/MVC/Symfony/Matcher/ContentBased/Id/Content.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\Id;
8
9 use eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued;
10 use eZ\Publish\API\Repository\Values\Content\Location as APILocation;
11 use eZ\Publish\API\Repository\Values\Content\ContentInfo;
12 use eZ\Publish\Core\MVC\Symfony\View\ContentValueView;
13 use eZ\Publish\Core\MVC\Symfony\View\View;
14
15 class Content extends MultipleValued
16 {
24 public function matchLocation(APILocation $location)
25 {
26 return isset($this->values[$location->getContentInfo()->id]);
27 }
28
36 public function matchContentInfo(ContentInfo $contentInfo)
37 {
38 return isset($this->values[$contentInfo->id]);
39 }
40
41 public function match(View $view)
42 {
43 if (!$view instanceof ContentValueView) {
44 return false;
45 }
46
47 return isset($this->values[$view->getContent()->contentInfo->id]);
48 }
49 }
eZ\Publish\API\Repository\Values\Content\ContentInfo
Definition: API/Repository/Values/Content/ContentInfo.php:31
eZ\Publish\API\Repository\Values\Content\Location
Definition: API/Repository/Values/Content/Location.php:32
eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\Id\Content
Definition: Publish/Core/MVC/Symfony/Matcher/ContentBased/Id/Content.php:16
eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\Id\Content\match
match(View $view)
Matches the $view against a set of matchers.
Definition: Publish/Core/MVC/Symfony/Matcher/ContentBased/Id/Content.php:41
eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\Id\Content\matchContentInfo
matchContentInfo(ContentInfo $contentInfo)
Checks if a ContentInfo object matches.
Definition: Publish/Core/MVC/Symfony/Matcher/ContentBased/Id/Content.php:36
eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\Id\Content\matchLocation
matchLocation(APILocation $location)
Checks if a Location object matches.
Definition: Publish/Core/MVC/Symfony/Matcher/ContentBased/Id/Content.php:24
eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued
Abstract class for basic matchers, accepting multiple values to match against.
Definition: ContentBased/MultipleValued.php:15
eZ\Publish\Core\MVC\Symfony\View\ContentValueView
A view that contains a Content.
Definition: ContentValueView.php:13
eZ\Publish\Core\MVC\Symfony\View\View
Main interface for Views of Value objects (content, block...).
Definition: Publish/Core/MVC/Symfony/View/View.php:16
eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\Id
Definition: Publish/Core/MVC/Symfony/Matcher/ContentBased/Id/Content.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.