function BlockContentListBuilder::getOperations
Same name and namespace in other branches
- 11.x core/modules/block_content/src/BlockContentListBuilder.php \Drupal\block_content\BlockContentListBuilder::getOperations()
Overrides EntityListBuilder::getOperations
File
-
core/
modules/ block_content/ src/ BlockContentListBuilder.php, line 51
Class
- BlockContentListBuilder
- Defines a class to build a listing of content block entities.
Namespace
Drupal\block_contentCode
public function getOperations(EntityInterface $entity) {
$args = func_get_args();
$cacheability = $args[1] ?? new CacheableMetadata();
$operations = parent::getOperations($entity, $cacheability);
// The 'View' operation doesn't make sense for content blocks.
unset($operations['view']);
return $operations;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.