commit 82a6608c565085befb51d9e103deb4aba2497afc Author: kgoel Date: Mon May 20 18:43:33 2013 -0400 Issue# 1978910 issues addressed under comment#11 diff --git a/core/modules/layout/layout.routing.yml b/core/modules/layout/layout.routing.yml index a7f745e..886fa75 100644 --- a/core/modules/layout/layout.routing.yml +++ b/core/modules/layout/layout.routing.yml @@ -5,7 +5,7 @@ layout_page_list: requirements: _permission: 'administer layouts' layout_page_view: - pattern: '/admin/structure/templates/manage/{node}' + pattern: '/admin/structure/templates/manage/{key}' defaults: _content: '\Drupal\layout\Controller\LayoutController::layoutPageView' requirements: diff --git a/core/modules/layout/lib/Drupal/layout/Controller/LayoutController.php b/core/modules/layout/lib/Drupal/layout/Controller/LayoutController.php index 60fd00a..9be996f 100644 --- a/core/modules/layout/lib/Drupal/layout/Controller/LayoutController.php +++ b/core/modules/layout/lib/Drupal/layout/Controller/LayoutController.php @@ -77,12 +77,23 @@ public function layoutPageList() { t('theme'); } + /** + * Page callback: Demonstrates a layout template. + * + * @param string $key + * The key of the page layout being requested. + * + * @return array + * An array as expected by drupal_render(). + * + * @see layout_menu() + */ public function layoutPageView($key) { - $layout = layout_manager()->getDefinition($key); + $layout = $this->layout_manager->getDefinition($key); drupal_set_title(t('View template %name', array('%name' => $layout['title'])), PASS_THROUGH); // Render the layout in an admin context with region demonstrations. - $instance = layout_manager()->createInstance($key, array()); + $instance = $this->layout_manager->createInstance($key, array()); $regions = $instance->getRegions(); foreach ($regions as $region => $info) { $regions[$region] = '
' . check_plain($info['label']) . '
'; @@ -94,4 +105,5 @@ public function layoutPageView($key) { $build['#attached']['css'][] = drupal_get_path('module', 'layout') . '/layout.admin.css'; return $build; } + }