diff -u b/core/lib/Drupal/Core/Config/Entity/ConfigEntityListController.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityListController.php --- b/core/lib/Drupal/Core/Config/Entity/ConfigEntityListController.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityListController.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\Core\Config\Entity\ConfigEntityListController. + * Definition of Drupal\Core\Config\Entity\ConfigEntityListController. */ namespace Drupal\Core\Config\Entity; @@ -17,7 +17,7 @@ class ConfigEntityListController extends EntityListController { /** - * Name of the entity's weight field. + * Name of the entity's weight field or FALSE if no field is provided. * * @var string|bool */ @@ -39,7 +39,7 @@ } /** - * Overrides EntityListController::load(). + * Overrides Drupal\Core\Entity\EntityListController::load(). */ public function load() { $entities = parent::load(); diff -u b/core/lib/Drupal/Core/Entity/EntityListController.php b/core/lib/Drupal/Core/Entity/EntityListController.php --- b/core/lib/Drupal/Core/Entity/EntityListController.php +++ b/core/lib/Drupal/Core/Entity/EntityListController.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\Core\Entity\EntityListController. + * Definition of Drupal\Core\Entity\EntityListController. */ namespace Drupal\Core\Entity; @@ -15,7 +15,7 @@ /** * The entity storage controller class. * - * @var \Drupal\Core\Entity\EntityStorageControllerInterface + * @var Drupal\Core\Entity\EntityStorageControllerInterface */ protected $storage; @@ -40,7 +40,7 @@ * * @param string $entity_type. * The type of entity to be listed. - * @param \Drupal\Core\Entity\EntityStorageControllerInterface $storage. + * @param Drupal\Core\Entity\EntityStorageControllerInterface $storage. * The entity storage controller class. */ public function __construct($entity_type, EntityStorageControllerInterface $storage) { @@ -50,21 +50,21 @@ } /** - * Implements EntityListControllerInterface::getStorageController(). + * Implements Drupal\Core\Entity\EntityListControllerInterface::getStorageController(). */ public function getStorageController() { return $this->storage; } /** - * Implements EntityListControllerInterface::load(). + * Implements Drupal\Core\Entity\EntityListControllerInterface::load(). */ public function load() { return $this->storage->load(); } /** - * Implements EntityListControllerInterface::getOperations(). + * Implements Drupal\Core\Entity\EntityListControllerInterface::getOperations(). */ public function getOperations(EntityInterface $entity) { $uri = $entity->uri(); @@ -89,7 +89,7 @@ * @return array * A render array structure of header strings. * - * @see \Drupal\Core\Entity\EntityListController::render() + * @see Drupal\Core\Entity\EntityListController::render() */ public function buildHeader() { $row['label'] = t('Label'); @@ -101,13 +101,13 @@ /** * Builds a row for an entity in the entity listing. * - * @param \Drupal\Core\Entity\EntityInterface $entity + * @param Drupal\Core\Entity\EntityInterface $entity * The entity for this row of the list. * * @return array * A render array structure of fields for this entity. * - * @see \Drupal\Core\Entity\EntityListController::render() + * @see Drupal\Core\Entity\EntityListController::render() */ public function buildRow(EntityInterface $entity) { $row['label'] = $entity->label(); @@ -119,13 +119,13 @@ /** * Builds a renderable list of operation links for the entity. * - * @param \Drupal\Core\Entity\EntityInterface $entity + * @param Drupal\Core\Entity\EntityInterface $entity * The entity on which the linked operations will be performed. * * @return array * A renderable array of operation links. * - * @see \Drupal\Core\Entity\EntityListController::render() + * @see Drupal\Core\Entity\EntityListController::render() */ public function buildOperations(EntityInterface $entity) { // Retrieve and sort operations. @@ -139,7 +139,7 @@ } /** - * Implements EntityListControllerInterface::render(). + * Implements Drupal\Core\Entity\EntityListControllerInterface::render(). * * Builds the entity list as renderable array for theme_table(). * diff -u b/core/modules/contact/lib/Drupal/contact/CategoryListController.php b/core/modules/contact/lib/Drupal/contact/CategoryListController.php --- b/core/modules/contact/lib/Drupal/contact/CategoryListController.php +++ b/core/modules/contact/lib/Drupal/contact/CategoryListController.php @@ -42,6 +42,8 @@ */ public function buildHeader() { $row = parent::buildHeader(); + // The two array_slice work together to put additional columns after the + // first ones. // @see http://drupal.org/node/1876718 $row = array_slice($row, 0, 2, TRUE) + array( 'default' => t('Default'), @@ -56,6 +58,8 @@ public function buildRow(EntityInterface $entity) { $default_category = config('contact.settings')->get('default_category'); $row = parent::buildRow($entity); + // The two array_slice work together to put additional columns after the + // first ones. // @see http://drupal.org/node/1876718 $row = array_slice($row, 0, 2, TRUE) + array( 'default' => array( only in patch2: unchanged: --- a/core/lib/Drupal/Core/Entity/EntityManager.php +++ b/core/lib/Drupal/Core/Entity/EntityManager.php @@ -102,6 +102,8 @@ * - uuid (optional): The name of the property that contains the universally * unique identifier of the entity, which is used to distinctly identify * an entity across different systems. + * - weight (optional): The name of the property that contains the weight of + * the configuration entity which is used to for ordering. * - bundle_keys: An array describing how the Field API can extract the * information it needs from the bundle objects for this type (e.g * Vocabulary objects for terms; not applicable for nodes). This entry can