X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fblock_content%2Fsrc%2FBlockContentListBuilder.php;h=f254a764dc1dcc004c07ee66b09927d5d3ef4091;hb=4f1b9b4ab48a8498afac9e2213a02a23ccf4a06c;hp=96259173cdd04e093bd8c5af1871701feb1ee703;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/web/core/modules/block_content/src/BlockContentListBuilder.php b/web/core/modules/block_content/src/BlockContentListBuilder.php index 96259173c..f254a764d 100644 --- a/web/core/modules/block_content/src/BlockContentListBuilder.php +++ b/web/core/modules/block_content/src/BlockContentListBuilder.php @@ -4,7 +4,6 @@ namespace Drupal\block_content; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityListBuilder; -use Drupal\Core\Routing\RedirectDestinationTrait; /** * Defines a class to build a listing of custom block entities. @@ -13,8 +12,6 @@ use Drupal\Core\Routing\RedirectDestinationTrait; */ class BlockContentListBuilder extends EntityListBuilder { - use RedirectDestinationTrait; - /** * {@inheritdoc} */ @@ -34,12 +31,16 @@ class BlockContentListBuilder extends EntityListBuilder { /** * {@inheritdoc} */ - public function getDefaultOperations(EntityInterface $entity) { - $operations = parent::getDefaultOperations($entity); - if (isset($operations['edit'])) { - $operations['edit']['query']['destination'] = $this->getRedirectDestination()->get(); + protected function getEntityIds() { + $query = $this->getStorage()->getQuery() + ->sort($this->entityType->getKey('id')); + $query->condition('reusable', TRUE); + + // Only add the pager if a limit is specified. + if ($this->limit) { + $query->pager($this->limit); } - return $operations; + return $query->execute(); } }