eZ\Publish\Core\FieldType\Page\PageService::getZoneDefinitionByLayout PHP Method

getZoneDefinitionByLayout() public method

It consists of a configuration array for the given layout.
public getZoneDefinitionByLayout ( string $layoutIdentifier ) : array
$layoutIdentifier string
return array
    public function getZoneDefinitionByLayout($layoutIdentifier)
    {
        if (!isset($this->zoneDefinition[$layoutIdentifier])) {
            throw new OutOfBoundsException("Could not find an ezpage zone definition block for given layout '{$layoutIdentifier}'");
        }
        return $this->zoneDefinition[$layoutIdentifier];
    }

Usage Example

 /**
  * @expectedException OutOfBoundsException
  *
  * @covers eZ\Publish\Core\FieldType\Page\PageService::getZoneDefinitionByLayout
  */
 public function testGetZoneDefinitionByLayoutInvalidLayout()
 {
     $this->pageService->getZoneDefinitionByLayout('invalid_layout');
 }