diff --git a/core/modules/page/lib/Drupal/page/PageFormController.php b/core/modules/page/lib/Drupal/page/PageFormController.php index 47eda85..74e0c88 100644 --- a/core/modules/page/lib/Drupal/page/PageFormController.php +++ b/core/modules/page/lib/Drupal/page/PageFormController.php @@ -37,6 +37,15 @@ public function form(array $form, array &$form_state, EntityInterface $page) { '#disabled' => (bool) $page->id(), ); + // @todo make this actually rely on layouts from the patch at + // http://drupal.org/node/1787846 when committed. + $form['layout'] = array( + '#type' => 'select', + '#title' => t('Layout for this page'), + '#default_value' => isset($page->layout) ? $page->layout : 'foo', + '#options' => array('foo', 'bar', 'baz'), + ); + // @todo this would ideally be pluggable and depend on general conditions // and all, however, these are not yet abstracted. $options = array( @@ -57,13 +66,6 @@ public function form(array $form, array &$form_state, EntityInterface $page) { '#description' => $description, ); - $form['layout'] = array( - '#type' => 'select', - '#title' => t('Layout for this page'), - // @todo get rid of foo/bar/baz. - '#default_value' => isset($page->layout) ? $page->layout : 'foo', - '#options' => array('foo', 'bar', 'baz'), - ); return parent::form($form, $form_state, $page); } diff --git a/core/modules/page/page.module b/core/modules/page/page.module index c49e0ee..81db1cf 100644 --- a/core/modules/page/page.module +++ b/core/modules/page/page.module @@ -110,7 +110,7 @@ function page_entity_info() { 'form controller class' => array( 'default' => 'Drupal\page\PageFormController', ), - 'list controller class' => 'Drupal\Core\Config\Entity\ConfigEntityListController', + 'list controller class' => 'Drupal\page\PageListController', 'list path' => 'admin/structure/pages', 'uri callback' => 'page_uri', 'config prefix' => 'page', diff --git a/core/modules/page/lib/Drupal/page/PageListController.php b/core/modules/page/lib/Drupal/page/PageListController.php new file mode 100644 index 0000000..4c8f4fc --- /dev/null +++ b/core/modules/page/lib/Drupal/page/PageListController.php @@ -0,0 +1,50 @@ +label(); + $row['paths'] = nl2br(check_plain($entity->paths)); + $operations = $this->buildOperations($entity); + $row['operations']['data'] = $operations; + return $row; + } + +}