You are here

protected function ConfigTranslationMapperList::buildOperations in Drupal 9

Same name and namespace in other branches
  1. 8 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;
}