function EntityListBuilder::getOperations

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Entity/EntityListBuilder.php \Drupal\Core\Entity\EntityListBuilder::getOperations()
1 method overrides EntityListBuilder::getOperations()
ConfigTranslationEntityListBuilder::getOperations in core/modules/config_translation/src/Controller/ConfigTranslationEntityListBuilder.php
Provides an array of information to build a list of operation links.

File

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

Class

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

Namespace

Drupal\Core\Entity

Code

public function getOperations(EntityInterface $entity) {
  $operations = $this->getDefaultOperations($entity);
  $operations += $this->moduleHandler()
    ->invokeAll('entity_operation', [
    $entity,
  ]);
  $this->moduleHandler
    ->alter('entity_operation', $operations, $entity);
  uasort($operations, '\\Drupal\\Component\\Utility\\SortArray::sortByWeightElement');
  return $operations;
}

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