public getBlockDefinitionByIdentifier ( string $blockIdentifier ) : array | ||
$blockIdentifier | string | |
return | array |
public function getBlockDefinitionByIdentifier($blockIdentifier)
{
if (!isset($this->blockDefinition[$blockIdentifier])) {
throw new OutOfBoundsException("Could not find an ezpage block definition for given identifier '{$blockIdentifier}'");
}
return $this->blockDefinition[$blockIdentifier];
}
/** * @expectedException OutOfBoundsException * * @covers eZ\Publish\Core\FieldType\Page\PageService::getBlockDefinitionByIdentifier */ public function testGetBlockDefinitionByIdentifierInvalidBlock() { $this->pageService->getBlockDefinitionByIdentifier('invalid_block_identifier'); }