EntityListBuilder::buildOperations

public EntityListBuilder::buildOperations(EntityInterface $entity)

Builds a renderable list of operation links for the entity.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity on which the linked operations will be performed.

Return value

array A renderable array of operation links.

See also

\Drupal\Core\Entity\EntityListBuilder::buildRow()

File

core/lib/Drupal/Core/Entity/EntityListBuilder.php, line 200

Class

EntityListBuilder
Defines a generic implementation to build a listing of entities.

Namespace

Drupal\Core\Entity

Code

1
2
3
4
5
6
7
8
public function buildOperations(EntityInterface $entity) {
  $build = array(
    '#type' => 'operations',
    '#links' => $this->getOperations($entity),
  );
 
  return $build;
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.