function EntityListBuilder::getOperations

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

Overrides EntityListBuilderInterface::getOperations

3 calls to 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.
EntityListBuilder::buildOperations in core/lib/Drupal/Core/Entity/EntityListBuilder.php
Builds a renderable list of operation links for the entity.
UserListBuilder::getOperations in core/modules/user/src/UserListBuilder.php
Provides an array of information to build a list of operation links.
2 methods override 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.
UserListBuilder::getOperations in core/modules/user/src/UserListBuilder.php
Provides an array of information to build a list of operation links.

File

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

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.