eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\Id\Content::matchLocation PHP Метод

matchLocation() публичный Метод

Checks if a Location object matches.
public matchLocation ( eZ\Publish\API\Repository\Values\Content\Location $location ) : boolean
$location eZ\Publish\API\Repository\Values\Content\Location
Результат boolean
    public function matchLocation(APILocation $location)
    {
        return isset($this->values[$location->getContentInfo()->id]);
    }

Usage Example

Пример #1
0
 /**
  * @dataProvider matchLocationProvider
  * @covers eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\Id\Content::matchLocation
  * @covers eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::setMatchingConfig
  *
  * @param int|int[] $matchingConfig
  * @param \eZ\Publish\API\Repository\Values\Content\Location $location
  * @param bool $expectedResult
  */
 public function testMatchLocation($matchingConfig, Location $location, $expectedResult)
 {
     $this->matcher->setMatchingConfig($matchingConfig);
     $this->assertSame($expectedResult, $this->matcher->matchLocation($location));
 }