X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fblock_content%2Fsrc%2FBlockContentListBuilder.php;h=f254a764dc1dcc004c07ee66b09927d5d3ef4091;hb=5b8bb166bfa98770daef9de5c127fc2e6ef02340;hp=7a4bdfc4c809b5e14db0717edf50fc75ca6bb95d;hpb=af6d1fb995500ae68849458ee10d66abbdcfb252;p=yaffs-website diff --git a/web/core/modules/block_content/src/BlockContentListBuilder.php b/web/core/modules/block_content/src/BlockContentListBuilder.php index 7a4bdfc4c..f254a764d 100644 --- a/web/core/modules/block_content/src/BlockContentListBuilder.php +++ b/web/core/modules/block_content/src/BlockContentListBuilder.php @@ -28,4 +28,19 @@ class BlockContentListBuilder extends EntityListBuilder { return $row + parent::buildRow($entity); } + /** + * {@inheritdoc} + */ + 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 $query->execute(); + } + }