public EntityListBuilder::getOperations(EntityInterface $entity)
Provides an array of information to build a list of operation links.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity the operations are for.
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.
Overrides EntityListBuilderInterface::getOperations
File
- core/lib/Drupal/Core/Entity/EntityListBuilder.php, line 121
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 getOperations(EntityInterface $entity ) { $operations = $this ->getDefaultOperations( $entity ); $operations += $this ->moduleHandler()->invokeAll( 'entity_operation' , array ( $entity )); $this ->moduleHandler->alter( 'entity_operation' , $operations , $entity ); uasort( $operations , '\Drupal\Component\Utility\SortArray::sortByWeightElement' ); return $operations ; } |
Please login to continue.