diff --git a/core/modules/layout/layout.module b/core/modules/layout/layout.module index 5483699..5f034bd 100644 --- a/core/modules/layout/layout.module +++ b/core/modules/layout/layout.module @@ -16,21 +16,6 @@ function layout_manager() { } /** - * Load a DisplayInterface object. - * - * This function exists solely for IDE typehinting purposes. - * - * @param $name - * @param string $type - * - * @return \Drupal\layout\Config\DisplayInterface - * The requested Display object. - */ -function display_load($name, $type = 'display') { - return entity_load($type, $name); -} - -/** * Implements hook_theme(). * * Expose all layouts as theme items, so themes can override layout markup. @@ -63,7 +48,6 @@ function layout_entity_info() { 'fieldable' => FALSE, 'entity keys' => array( 'id' => 'id', - 'label' => 'label', // @todo may not need this if internal-only (?) 'uuid' => 'uuid', ), ), @@ -75,7 +59,6 @@ function layout_entity_info() { 'fieldable' => FALSE, 'entity keys' => array( 'id' => 'id', - 'label' => 'label', // @todo may not need this if internal-only (?) 'uuid' => 'uuid', ), ) diff --git a/core/modules/layout/lib/Drupal/layout/Config/BoundDisplayInterface.php b/core/modules/layout/lib/Drupal/layout/Config/BoundDisplayInterface.php new file mode 100644 index 0000000..049d5ef --- /dev/null +++ b/core/modules/layout/lib/Drupal/layout/Config/BoundDisplayInterface.php @@ -0,0 +1,75 @@ +blocksInRegions === NULL) { + $this->sortBlocks(); + } + + if (!isset($this->blocksInRegions[$region])) { + throw new \Exception(sprintf("Region %region does not exist in layout %layout", array('%region' => $region, '%layout' => $this->getLayoutPluginInstance()->name)), E_RECOVERABLE_ERROR); + } + + return $this->blocksInRegions[$region]; } - public function setMainContent($callback, array $args = array()) { - // @todo need to wrap the callback up in a passthru block - // @todo consider throwing an exception if this display instance doesn't appear to support main content + /** + * Implements DisplayInterface::getAllSortedBlocks(). + * + * @return array|mixed + */ + public function getAllSortedBlocks() { + if ($this->blocksInRegions === NULL) { + $this->sortBlocks(); + } + + return $this->blocksInRegions; + } + + /** + * Transform the stored blockConfig into a sorted, region-oriented array. + */ + protected function sortBlocks() { + $layout_instance = $this->getLayoutPluginInstance(); + if ($this->layout !== $layout_instance->getPluginId()) { + $block_config = $this->mapBlocksToLayout($layout_instance); + } + else { + $block_config = $this->blockInfo; + } + + $this->blocksInRegions = array(); + + $regions = array_fill_keys(array_keys($layout_instance->getRegions()), array()); + foreach ($block_config as $config_name => $info) { + $regions[$info['region']][$config_name] = $info; + } + + foreach ($regions as $region_name => &$blocks) { + uasort($blocks, 'drupal_sort_weight'); + $this->blocksInRegions[$region_name] = array_keys($blocks); + } } /** @@ -52,18 +139,11 @@ public function setLayout($plugin_id) { } /** - * Returns an UnboundDisplay by stripping out the layout and region-specific - * bindings on this object. - * - * @param string $id - * The id that will be used to uniquely identify the created UnboundDisplay. - * It will be appended to the config prefix for Displays ("display.unbound", - * unless altered) to form the new Display's config address. + * Implements BoundDisplayInterface::generateUnboundDisplay(). * - * @return \Drupal\layout\Config\UnboundDisplay - * The newly-created UnboundDisplay. + * @throws \Exception */ - public function generateUnboundDisplay($id) { + public function generateUnboundDisplay($id, $entity_type = 'unbound_display') { $block_info = $this->getAllBlockInfo(); foreach ($block_info as &$info) { unset ($info['region']); @@ -71,11 +151,15 @@ public function generateUnboundDisplay($id) { $values = array( 'blockInfo' => $block_info, - 'staticData' => $this->staticData, // @todo this could create portability problems 'id' => $id, ); - return entity_create('unbound_display', $values); + $entity = entity_create($entity_type, $values); + if (!$entity instanceof UnboundDisplayInterface) { + throw new \Exception(sprintf('Attempted to create an unbound display using an invalid entity type.'), E_RECOVERABLE_ERROR); + } + + return $entity; } public function getLayoutPluginInstance() { diff --git a/core/modules/layout/lib/Drupal/layout/Config/DisplayBase.php b/core/modules/layout/lib/Drupal/layout/Config/DisplayBase.php index c7b65bd..95c07bb 100644 --- a/core/modules/layout/lib/Drupal/layout/Config/DisplayBase.php +++ b/core/modules/layout/lib/Drupal/layout/Config/DisplayBase.php @@ -27,14 +27,6 @@ public $id; /** - * The human-readable label of this display. - * @todo we probably don't need/want to have this - but is it safe to remove? - * - * @var string - */ - public $label; - - /** * The UUID identifying a specific display object. * * @var string @@ -42,43 +34,6 @@ public $uuid; /** - * The layout plugin instance being used to serve this page. - * - * @var \Drupal\layout\Plugin\LayoutInterface - */ - protected $layoutPlugin; - - /** - * The name of the layout plugin to use. - * - * @var string - */ - public $layout; - - /** - * An array of settings to be coupled with the layout plugin to create a - * layout plugin instance. - * - * @var array - * - * @todo we might possibly want to separate this into its own config object - */ - public $layoutSettings = array(); - - /** - * Storage for data sources that have been statically assigned - that is, not - * derived in some way from the Request. - * - * The array is keyed on the name of a data source, and the values are getters - * that are able to retrieve the appropriate data. - * - * @todo define how the getters work. - * - * @var array - */ - public $staticData = array(); - - /** * Contains all block configuration. * * There are two levels to the configuration contained herein: display-level @@ -125,76 +80,24 @@ */ protected $blockInfo = array(); - protected $blocksInRegions; - /** - * {@inheritdoc} - * - * @todo this is super hacky right now, and we need to determine how we do this. + * Implements DisplayInterface::getAllBlockInfo(). * - * @return bool + * @return array */ - public function hasMainContent() { - $info = $this->getAllBlockInfo(); - return (isset($info['maincontent'])); - } - public function getAllBlockInfo() { return $this->blockInfo; } - public function getSortedBlocksByRegion($region = '') { - if ($this->blocksInRegions === NULL) { - $this->sortBlocks(); - } - - if (!isset($this->blocksInRegions[$region])) { - throw new \Exception(sprintf("Region %region does not exist in layout %layout", array('%region' => $region, '%layout' => $this->getLayoutPluginInstance()->name)), E_RECOVERABLE_ERROR); - } - - return $this->blocksInRegions[$region]; - } - - public function getAllSortedBlocks() { - if ($this->blocksInRegions === NULL) { - $this->sortBlocks(); - } - - return $this->blocksInRegions; - } - - /** - * @param $info - */ - public function setBlockInfo($info) { - $this->blockInfo = $info; - } - /** - * Transform the stored blockConfig into a sorted, region-oriented array. + * Implements DisplayInterface::mapBlocksToLayout(). + * + * @todo this logic ought not be tightly coupled to this class. + * + * @param \Drupal\layout\Plugin\LayoutInterface $layout + * + * @return array */ - protected function sortBlocks() { - $layout_instance = $this->getLayoutPluginInstance(); - if ($this->layout !== $layout_instance->getPluginId()) { - $block_config = $this->mapBlocksToLayout($layout_instance); - } - else { - $block_config = $this->blockInfo; - } - - $this->blocksInRegions = array(); - - $regions = array_fill_keys(array_keys($layout_instance->getRegions()), array()); - foreach ($block_config as $config_name => $info) { - $regions[$info['region']][$config_name] = $info; - } - - foreach ($regions as $region_name => &$blocks) { - uasort($blocks, 'drupal_sort_weight'); - $this->blocksInRegions[$region_name] = array_keys($blocks); - } - } - public function mapBlocksToLayout(LayoutInterface $layout) { $types = array(); @@ -212,7 +115,6 @@ public function mapBlocksToLayout(LayoutInterface $layout) { } // Then, try to remap using region types. else if (!empty($types[$info['region-type']])) { - // @todo this logic means we only EVER assign to the first region of a type. ick. $info['region'] = reset($types[$info['region-type']]); } // Finally, fall back to dumping everything in the layout's first region. diff --git a/core/modules/layout/lib/Drupal/layout/Config/DisplayInterface.php b/core/modules/layout/lib/Drupal/layout/Config/DisplayInterface.php index 1b38676..1337077 100644 --- a/core/modules/layout/lib/Drupal/layout/Config/DisplayInterface.php +++ b/core/modules/layout/lib/Drupal/layout/Config/DisplayInterface.php @@ -11,58 +11,6 @@ interface DisplayInterface { /** - * Introspects the contained config to determine whether or not this Display - * supports the 'main content' passthrough. - * - * @return bool - */ - public function hasMainContent(); - - /** - * Sets the controller that should be used to serve the main page content. - * - * "Main page content" is analogous to the callback specified in - * 'page callback' in Drupal 6 and 7. In a blocks-driven world, such direct - * callbacks run a bit against the grain. However, the simplicity of - * implementing and understanding it is so beneficial to developer experience - * that we provide this 'main' content option, which simulates the old - * behavior by injecting a virtualized 'main' block that passes through - * to a specified callback. - * - * We normalize the main content block here in the configuration object so - * that various controllers consuming the display need not repeatedly - * implement this special handling for the main callback. - * - * @todo this is fairly specific to pages - maybe not best for the interface - * - * @param Callable $callback - * Any form of callable. - * @param array $args - * An array of arguments to pass to the callable. - */ - public function setMainContent($callback, array $args = array()); - - /** - * Returns an indexed array of block config names, sorted by the order in - * which they should appear in the region. - * * - * @param string $region - * The region from which to return the set of blocks. - * - * @return array - */ - public function getSortedBlocksByRegion($region = ''); - - /** - * Returns an array of arrays, keyed by region name and containing the - * same data as that which is returned by - * @see DisplayInterface::getSortedBlocksByRegion(). - * - * @return mixed - */ - public function getAllSortedBlocks(); - - /** * Returns the config info about all blocks on this display. * * There are two levels of configuration that are being captured here: the @@ -88,11 +36,4 @@ public function getAllBlockInfo(); * is returned by DisplayInterface::getAllBlockInfo(). */ public function mapBlocksToLayout(LayoutInterface $layout); - - /** - * Returns the layout plugin instance to be used with this display. - * - * @return \Drupal\layout\Plugin\LayoutInterface - */ - public function getLayoutPluginInstance(); } diff --git a/core/modules/layout/lib/Drupal/layout/Config/UnboundDisplay.php b/core/modules/layout/lib/Drupal/layout/Config/UnboundDisplay.php index 27eda8f..7a066af 100644 --- a/core/modules/layout/lib/Drupal/layout/Config/UnboundDisplay.php +++ b/core/modules/layout/lib/Drupal/layout/Config/UnboundDisplay.php @@ -16,48 +16,26 @@ * Unbound displays contain blocks that are not 'bound' to a specific layout, * and their contained blocks are mapped only to region types, not real regions. */ -class UnboundDisplay extends DisplayBase { - - public function __construct(array $values, $entity_type) { - // Forcibly restrict this from ever being built as a different entity type. - parent::__construct($values, 'display'); - } - - public function setMainContent($callback, array $args = array()) { - throw new \Exception('Cannot set the main content passthrough block an an unbound display.', E_RECOVERABLE_ERROR); - } +class UnboundDisplay extends DisplayBase implements UnboundDisplayInterface { /** - * Bind this UnboundDisplay to a particular display. - * - * This will DisplayInterface::mapBlocksToLayout() using the provided layout, - * then create and return a new Display object with the output. This is just - * a factory - calling code is responsible for saving the + * Implements UnboundDisplayInterface::generateDisplay(). * - * @param \Drupal\layout\Plugin\LayoutInterface $layout - * The layout plugin to which this config object should be bound. - * - * @param string $id - * The id that will be used to uniquely identify the created Display. It - * will be appended to the config prefix for Displays ("display", unless - * altered) to form the new Display's config address. - * - * @return \Drupal\layout\Config\Display - * A Display object that has had the data from this config object mapped to - * the provided layout plugin. + * @throws \Exception */ - public function generateDisplay(LayoutInterface $layout, $id) { + public function generateDisplay(LayoutInterface $layout, $id, $entity_type = 'display') { $values = array( 'layout' => $layout->getPluginId(), 'blockInfo' => $this->mapBlocksToLayout($layout), - 'staticData' => $this->staticData, // @todo this could create portability problems 'id' => $id, ); - return entity_create('display', $values); - } + $entity = entity_create($entity_type, $values); + + if (!$entity instanceof BoundDisplayInterface) { + throw new \Exception(sprintf('Attempted to bind an unbound display but provided an invalid entity type.'), E_RECOVERABLE_ERROR); + } - public function getLayoutPluginInstance() { - throw new \Exception('Cannot get a layout plugin from an unbound display; by definition, they are not bound to a layout.', E_RECOVERABLE_ERROR); + return $entity; } } diff --git a/core/modules/layout/lib/Drupal/layout/Config/UnboundDisplayInterface.php b/core/modules/layout/lib/Drupal/layout/Config/UnboundDisplayInterface.php new file mode 100644 index 0000000..9549788 --- /dev/null +++ b/core/modules/layout/lib/Drupal/layout/Config/UnboundDisplayInterface.php @@ -0,0 +1,36 @@ +twocol = display_load('test_twocol'); - $this->onecol = display_load('test_onecol'); - $this->unbound = display_load('test_unbound_display', 'unbound_display'); + $this->twocol = entity_load('display', 'test_twocol'); + $this->onecol = entity_load('display', 'test_onecol'); + $this->unbound = entity_load('unbound_display', 'test_unbound_display'); } /** @@ -69,12 +69,12 @@ public function testBlockSorting() { $left = $this->twocol->getSortedBlocksByRegion('left'); $this->assertEqual(count($left), 2, 'Two blocks found in left region.'); list($first, $second) = $left; - $this->assertEqual($first, 'plugin.core.block.navigation_instance2', 'navigation_instance2 block instance is first in the left region.'); - $this->assertEqual($second, 'plugin.core.block.main_block', 'main_block block instance is second in the left region.'); + $this->assertIdentical($first, 'plugin.core.block.test_navigation_instance2'); + $this->assertIdentical($second, 'plugin.core.block.test_main_block'); $right = $this->twocol->getSortedBlocksByRegion('right'); $this->assertEqual(count($right), 1, 'One block found in right region.'); - $this->assertEqual(reset($right), 'plugin.core.block.navigation_instance', 'navigation_instance block instance is the only block in the right region.'); + $this->assertIdentical(reset($right), 'plugin.core.block.test_navigation_instance', 'test_navigation_instance block instance is the only block in the right region.'); $all = $this->twocol->getAllSortedBlocks(); $this->assertEqual(count($all), 2, 'Block sorting produces exactly two regions.'); @@ -97,9 +97,9 @@ public function testBlockMapping() { list($first, $second, $third) = $middle; // @todo the determining factors for which of the nav instances comes first is twisty. improve it. - $this->assertEqual($first, 'plugin.core.block.navigation_instance2', 'navigation_instance2 block instance is first in the only region after twocol to onecol remapping.'); - $this->assertEqual($second, 'plugin.core.block.navigation_instance', 'navigation_instance block instance is second in the only region after twocol to onecol remapping.'); - $this->assertEqual($third, 'plugin.core.block.main_block', 'main_block block instance is third and last in the only region after twocol to onecol remapping.'); + $this->assertIdentical($first, 'plugin.core.block.test_navigation_instance2'); + $this->assertIdentical($second, 'plugin.core.block.test_navigation_instance'); + $this->assertIdentical($third, 'plugin.core.block.test_main_block'); // Now, remap from the onecol to twocol. $one_to_two = clone($this->onecol); @@ -107,8 +107,8 @@ public function testBlockMapping() { $this->assertEqual(count($one_to_two->getAllSortedBlocks()), 2, 'getAllSortedBlocks() returns two regions even though one is empty after onecol to twocol remapping.'); list($first, $second) = $one_to_two->getSortedBlocksByRegion('left'); - $this->assertEqual($first, 'plugin.core.block.navigation_instance', 'navigation_instance block instance is first in the left region after onecol to twocol remapping.'); - $this->assertEqual($second, 'plugin.core.block.main_block', 'main_block block instance is second in the left region after onecol to twocol remapping.'); + $this->assertIdentical($first, 'plugin.core.block.test_navigation_instance'); + $this->assertIdentical($second, 'plugin.core.block.test_main_block'); // Make sure we have an empty right region - no surprises! $this->assertIdentical($one_to_two->getSortedBlocksByRegion('right'), array(), 'Region with no blocks comes back from getSortedBlocksByRegion() as an empty array.'); @@ -117,8 +117,8 @@ public function testBlockMapping() { $this->assertTrue($unbound_to_twocol instanceof Display, 'Binding the unbound display successfully created a Display object'); $left = $unbound_to_twocol->getSortedBlocksByRegion('left'); list($first, $second) = $left; - $this->assertEqual($first, 'plugin.core.block.main_block', 'main_block block instance is first in the left region after generating a display by binding the unbound test to twocol.'); - $this->assertEqual($second, 'plugin.core.block.navigation_instance2', 'navigation_instance2 block instance ended up in left region as a fallback when generating a display by binding the unbound test to twocol.'); + $this->assertIdentical($first, 'plugin.core.block.test_main_block'); + $this->assertIdentical($second, 'plugin.core.block.test_navigation_instance2'); // Finally, generate an unbound display from the twocol display. $twocol_to_unbound = $this->twocol->generateUnboundDisplay('twocol_to_unbound'); @@ -130,8 +130,8 @@ public function testBlockMapping() { $this->assertTrue(empty($info['region']), sprintf('Block info for block %address has no region associated with it.', array('%address' => $address))); } - $this->assertEqual($blocks_info['plugin.core.block.main_block']['region-type'], 'content', 'main_block is mapped to region type "content".'); - $this->assertEqual($blocks_info['plugin.core.block.navigation_instance']['region-type'], 'aside', 'navigation_instance is mapped to region type "aside".'); - $this->assertEqual($blocks_info['plugin.core.block.navigation_instance2']['region-type'], 'content', 'navigation_instance2 is mapped to region type "content".'); + $this->assertIdentical($blocks_info['plugin.core.block.test_main_block']['region-type'], 'content'); + $this->assertIdentical($blocks_info['plugin.core.block.test_navigation_instance']['region-type'], 'aside'); + $this->assertIdentical($blocks_info['plugin.core.block.test_navigation_instance2']['region-type'], 'content'); } } diff --git a/core/modules/layout/tests/config/display.test_onecol.yml b/core/modules/layout/tests/config/display.test_onecol.yml index f1176bf..dda0342 100644 --- a/core/modules/layout/tests/config/display.test_onecol.yml +++ b/core/modules/layout/tests/config/display.test_onecol.yml @@ -4,11 +4,11 @@ layout: static_layout:layout_test__one-col layoutSettings: { } staticData: { } blockInfo: - plugin.core.block.main_block: + plugin.core.block.test_main_block: region: middle region-type: content weight: 100 - plugin.core.block.navigation_instance: + plugin.core.block.test_navigation_instance: region: middle region-type: content weight: -100 diff --git a/core/modules/layout/tests/config/display.test_twocol.yml b/core/modules/layout/tests/config/display.test_twocol.yml index 431fa7a..fefe355 100644 --- a/core/modules/layout/tests/config/display.test_twocol.yml +++ b/core/modules/layout/tests/config/display.test_twocol.yml @@ -4,15 +4,15 @@ layout: static_layout:layout_test_theme__two-col layoutSettings: { } staticData: { } blockInfo: - plugin.core.block.main_block: + plugin.core.block.test_main_block: region: left region-type: content weight: 100 - plugin.core.block.navigation_instance: + plugin.core.block.test_navigation_instance: region: right region-type: aside weight: -100 - plugin.core.block.navigation_instance2: + plugin.core.block.test_navigation_instance2: region: left region-type: content weight: -100 \ No newline at end of file diff --git a/core/modules/layout/tests/config/display.unbound.test_unbound_display.yml b/core/modules/layout/tests/config/display.unbound.test_unbound_display.yml index e51a56d..db8c8fc 100644 --- a/core/modules/layout/tests/config/display.unbound.test_unbound_display.yml +++ b/core/modules/layout/tests/config/display.unbound.test_unbound_display.yml @@ -3,12 +3,12 @@ label: Unbound display test layoutSettings: { } staticData: { } blockInfo: - plugin.core.block.main_block: + plugin.core.block.test_main_block: region-type: content weight: -100 - plugin.core.block.navigation_instance: + plugin.core.block.test_navigation_instance: region-type: aside weight: -100 - plugin.core.block.navigation_instance2: + plugin.core.block.test_navigation_instance2: region-type: nav weight: 0 \ No newline at end of file diff --git a/core/modules/layout/tests/config/plugin.core.block.main_block.yml b/core/modules/layout/tests/config/plugin.core.block.main_block.yml deleted file mode 100644 index de31170..0000000 --- a/core/modules/layout/tests/config/plugin.core.block.main_block.yml +++ /dev/null @@ -1,18 +0,0 @@ -id: system_main_block -status: '1' -cache: '-1' -visibility: - path: - visibility: '0' - pages: '' - role: - roles: { } - node_type: - types: - article: '0' - page: '0' - visibility__active_tab: edit-visibility-path -subject: 'main content' -module: system -region: content -weight: '0' diff --git a/core/modules/layout/tests/config/plugin.core.block.navigation_instance.yml b/core/modules/layout/tests/config/plugin.core.block.navigation_instance.yml deleted file mode 100644 index c833f42..0000000 --- a/core/modules/layout/tests/config/plugin.core.block.navigation_instance.yml +++ /dev/null @@ -1,18 +0,0 @@ -id: 'system_menu_block:navigation' -status: '1' -cache: '-1' -visibility: - path: - visibility: '0' - pages: '' - role: - roles: { } - node_type: - types: - article: '0' - page: '0' - visibility__active_tab: edit-visibility-path -subject: Navigation -module: system -region: sidebar_first -weight: '0' diff --git a/core/modules/layout/tests/config/plugin.core.block.navigation_instance2.yml b/core/modules/layout/tests/config/plugin.core.block.navigation_instance2.yml deleted file mode 100644 index c833f42..0000000 --- a/core/modules/layout/tests/config/plugin.core.block.navigation_instance2.yml +++ /dev/null @@ -1,18 +0,0 @@ -id: 'system_menu_block:navigation' -status: '1' -cache: '-1' -visibility: - path: - visibility: '0' - pages: '' - role: - roles: { } - node_type: - types: - article: '0' - page: '0' - visibility__active_tab: edit-visibility-path -subject: Navigation -module: system -region: sidebar_first -weight: '0' diff --git a/core/modules/layout/tests/config/plugin.core.block.test_main_block.yml b/core/modules/layout/tests/config/plugin.core.block.test_main_block.yml new file mode 100644 index 0000000..de31170 --- /dev/null +++ b/core/modules/layout/tests/config/plugin.core.block.test_main_block.yml @@ -0,0 +1,18 @@ +id: system_main_block +status: '1' +cache: '-1' +visibility: + path: + visibility: '0' + pages: '' + role: + roles: { } + node_type: + types: + article: '0' + page: '0' + visibility__active_tab: edit-visibility-path +subject: 'main content' +module: system +region: content +weight: '0' diff --git a/core/modules/layout/tests/config/plugin.core.block.test_navigation_instance.yml b/core/modules/layout/tests/config/plugin.core.block.test_navigation_instance.yml new file mode 100644 index 0000000..c833f42 --- /dev/null +++ b/core/modules/layout/tests/config/plugin.core.block.test_navigation_instance.yml @@ -0,0 +1,18 @@ +id: 'system_menu_block:navigation' +status: '1' +cache: '-1' +visibility: + path: + visibility: '0' + pages: '' + role: + roles: { } + node_type: + types: + article: '0' + page: '0' + visibility__active_tab: edit-visibility-path +subject: Navigation +module: system +region: sidebar_first +weight: '0' diff --git a/core/modules/layout/tests/config/plugin.core.block.test_navigation_instance2.yml b/core/modules/layout/tests/config/plugin.core.block.test_navigation_instance2.yml new file mode 100644 index 0000000..c833f42 --- /dev/null +++ b/core/modules/layout/tests/config/plugin.core.block.test_navigation_instance2.yml @@ -0,0 +1,18 @@ +id: 'system_menu_block:navigation' +status: '1' +cache: '-1' +visibility: + path: + visibility: '0' + pages: '' + role: + roles: { } + node_type: + types: + article: '0' + page: '0' + visibility__active_tab: edit-visibility-path +subject: Navigation +module: system +region: sidebar_first +weight: '0' diff --git a/core/modules/layout/tests/layout_test.module b/core/modules/layout/tests/layout_test.module index 687f0bd..07e6d3c 100644 --- a/core/modules/layout/tests/layout_test.module +++ b/core/modules/layout/tests/layout_test.module @@ -26,9 +26,9 @@ function layout_test_page() { global $theme; $theme = 'layout_test_theme'; theme_enable(array($theme)); - $display = display_load('test_twocol'); + $display = entity_load('display', 'test_twocol'); $layout = $display->getLayoutPluginInstance(); - // @fixme this implementation ignores blocks completely, so is inherently incomplete. + // @todo this implementation ignores blocks completely, so is inherently incomplete. return $layout->renderLayout(); }