BlockContentListBuilder.php in Drupal 10
File
core/modules/block_content/src/BlockContentListBuilder.php
View source
<?php
namespace Drupal\block_content;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityListBuilder;
class BlockContentListBuilder extends EntityListBuilder {
public function buildHeader() {
$header['label'] = $this
->t('Block description');
return $header + parent::buildHeader();
}
public function buildRow(EntityInterface $entity) {
$row['label'] = $entity
->label();
return $row + parent::buildRow($entity);
}
protected function getEntityIds() {
$query = $this
->getStorage()
->getQuery()
->accessCheck(TRUE)
->sort($this->entityType
->getKey('id'));
$query
->condition('reusable', TRUE);
if ($this->limit) {
$query
->pager($this->limit);
}
return $query
->execute();
}
}