diff --git a/core/lib/Drupal/Core/Entity/EntityListControllerBase.php b/core/lib/Drupal/Core/Entity/EntityListControllerBase.php index e251dcb..20b34ae 100644 --- a/core/lib/Drupal/Core/Entity/EntityListControllerBase.php +++ b/core/lib/Drupal/Core/Entity/EntityListControllerBase.php @@ -73,8 +73,7 @@ public function buildHeader() { public function buildRow(EntityInterface $entity) { $row['label'] = $entity->label(); $row['id'] = $entity->id(); - $operations = $this->buildOperations($entity); - $row['operations'] = drupal_render($operations); + $row['operations']['data'] = $this->buildOperations($entity); return $row; } @@ -82,14 +81,8 @@ public function buildRow(EntityInterface $entity) { * Implements Drupal\Core\Entity\EntityListControllerInterface::buildOperations(); */ public function buildOperations(EntityInterface $entity) { - // Retrieve and sort operations. $operations = $this->getOperations($entity); - uasort($operations, 'drupal_sort_weight'); - $build = array( - '#theme' => 'links', - '#links' => $operations, - ); - return $build; + return $operations; } /** diff --git a/core/modules/config/lib/Drupal/config/ConfigEntityListController.php b/core/modules/config/lib/Drupal/config/ConfigEntityListController.php index a674020..1b56899 100644 --- a/core/modules/config/lib/Drupal/config/ConfigEntityListController.php +++ b/core/modules/config/lib/Drupal/config/ConfigEntityListController.php @@ -30,16 +30,18 @@ public function load() { public function getOperations(EntityInterface $entity) { $uri = $entity->uri(); $operations['edit'] = array( - 'title' => t('edit'), - 'href' => $uri['path'] . '/edit', - 'options' => $uri['options'], - 'weight' => 10, + '#type' => 'link', + '#title' => t('edit'), + '#href' => $uri['path'] . '/edit', + '#options' => $uri['options'], + '#weight' => 10, ); $operations['delete'] = array( - 'title' => t('delete'), - 'href' => $uri['path'] . '/delete', - 'options' => $uri['options'], - 'weight' => 100, + '#type' => 'link', + '#title' => t('delete'), + '#href' => $uri['path'] . '/delete', + '#options' => $uri['options'], + '#weight' => 100, ); return $operations; }