W3cubDocs

/Drupal 8

public function 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

public function buildOperations(EntityInterface $entity) {
  $build = array(
    '#type' => 'operations',
    '#links' => $this->getOperations($entity),
  );

  return $build;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!EntityListBuilder.php/function/EntityListBuilder::buildOperations/8.1.x