function ConfigNamesMapper::getOperations

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

Provides an array of information to build a list of operation links.

Return value

array An associative array of operation link data for this list, keyed by operation name, containing the following key-value pairs:

  • title: The localized title of the operation.
  • href: The path for the operation.
  • options: An array of URL options for the path.
  • weight: The weight of this operation.

Overrides ConfigMapperInterface::getOperations

1 method overrides ConfigNamesMapper::getOperations()
ConfigEntityMapper::getOperations in core/modules/config_translation/src/ConfigEntityMapper.php
Provides an array of information to build a list of operation links.

File

core/modules/config_translation/src/ConfigNamesMapper.php, line 486

Class

ConfigNamesMapper
Configuration mapper base implementation.

Namespace

Drupal\config_translation

Code

public function getOperations() {
    return [
        'translate' => [
            'title' => $this->t('Translate'),
            'url' => Url::fromRoute($this->getOverviewRouteName(), $this->getOverviewRouteParameters()),
        ],
    ];
}

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