function ConfigTranslationEntityListBuilder::getOperations

Same name in other branches
  1. 8.9.x core/modules/config_translation/src/Controller/ConfigTranslationEntityListBuilder.php \Drupal\config_translation\Controller\ConfigTranslationEntityListBuilder::getOperations()
  2. 10 core/modules/config_translation/src/Controller/ConfigTranslationEntityListBuilder.php \Drupal\config_translation\Controller\ConfigTranslationEntityListBuilder::getOperations()
  3. 11.x core/modules/config_translation/src/Controller/ConfigTranslationEntityListBuilder.php \Drupal\config_translation\Controller\ConfigTranslationEntityListBuilder::getOperations()

Overrides EntityListBuilder::getOperations

File

core/modules/config_translation/src/Controller/ConfigTranslationEntityListBuilder.php, line 82

Class

ConfigTranslationEntityListBuilder
Defines the configuration translation list builder for entities.

Namespace

Drupal\config_translation\Controller

Code

public function getOperations(EntityInterface $entity) {
    $operations = parent::getOperations($entity);
    foreach (array_keys($operations) as $operation) {
        // This is a translation UI for translators. Show the translation
        // operation only.
        if (!($operation == 'translate')) {
            unset($operations[$operation]);
        }
    }
    return $operations;
}

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