BlockContentListBuilder.php in Zircon Profile 8.0
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'] = t('Block description');
return $header + parent::buildHeader();
}
public function buildRow(EntityInterface $entity) {
$row['label'] = $entity
->label();
return $row + parent::buildRow($entity);
}
public function getDefaultOperations(EntityInterface $entity) {
$operations = parent::getDefaultOperations($entity);
if (isset($operations['edit'])) {
$operations['edit']['query']['destination'] = $entity
->url('collection');
}
return $operations;
}
}