function EntityListBuilderInterface::getOperations

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Entity/EntityListBuilderInterface.php \Drupal\Core\Entity\EntityListBuilderInterface::getOperations()
  2. 10 core/lib/Drupal/Core/Entity/EntityListBuilderInterface.php \Drupal\Core\Entity\EntityListBuilderInterface::getOperations()
  3. 9 core/lib/Drupal/Core/Entity/EntityListBuilderInterface.php \Drupal\Core\Entity\EntityListBuilderInterface::getOperations()
  4. 8.9.x core/lib/Drupal/Core/Entity/EntityListBuilderInterface.php \Drupal\Core\Entity\EntityListBuilderInterface::getOperations()

Provides an array of information to build a list of operation links.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity the operations are for.

\Drupal\Core\Cache\CacheableMetadata|null $cacheability: The cacheable metadata to add to if your operations vary by or depend on something.

Return value

array An associative array of operation link data for this list, keyed by operation name, containing the following key-value pairs:

  • title: The localized title of the operation.
  • url: An instance of \Drupal\Core\Url for the operation URL.
  • weight: The weight of this operation.
1 method overrides EntityListBuilderInterface::getOperations()
EntityListBuilder::getOperations in core/lib/Drupal/Core/Entity/EntityListBuilder.php

File

core/lib/Drupal/Core/Entity/EntityListBuilderInterface.php, line 49

Class

EntityListBuilderInterface
Defines an interface to build entity listings.

Namespace

Drupal\Core\Entity

Code

public function getOperations(EntityInterface $entity, ?CacheableMetadata $cacheability = NULL);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.