function ConfigTranslationMapperList::buildOperations

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

Builds a renderable list of operation links for the entity.

Parameters

\Drupal\config_translation\ConfigMapperInterface $mapper: The mapper.

Return value

array A renderable array of operation links.

See also

\Drupal\Core\Entity\EntityList::buildOperations()

1 call to ConfigTranslationMapperList::buildOperations()
ConfigTranslationMapperList::buildRow in core/modules/config_translation/src/Controller/ConfigTranslationMapperList.php
Builds a row for a mapper in the mapper listing.

File

core/modules/config_translation/src/Controller/ConfigTranslationMapperList.php, line 119

Class

ConfigTranslationMapperList
Defines the configuration translation mapper list.

Namespace

Drupal\config_translation\Controller

Code

protected function buildOperations(ConfigMapperInterface $mapper) {
    // Retrieve and sort operations.
    $operations = $mapper->getOperations();
    uasort($operations, 'Drupal\\Component\\Utility\\SortArray::sortByWeightElement');
    $build = [
        '#type' => 'operations',
        '#links' => $operations,
    ];
    return $build;
}

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