You are here

protected function LingotekTargetStatuses::getActionUrlArgumentsForConfigMapper in Lingotek Translation 3.6.x

Same name and namespace in other branches
  1. 4.0.x src/Element/LingotekTargetStatuses.php \Drupal\lingotek\Element\LingotekTargetStatuses::getActionUrlArgumentsForConfigMapper()
  2. 3.7.x src/Element/LingotekTargetStatuses.php \Drupal\lingotek\Element\LingotekTargetStatuses::getActionUrlArgumentsForConfigMapper()
  3. 3.8.x src/Element/LingotekTargetStatuses.php \Drupal\lingotek\Element\LingotekTargetStatuses::getActionUrlArgumentsForConfigMapper()
1 call to LingotekTargetStatuses::getActionUrlArgumentsForConfigMapper()
LingotekTargetStatuses::getSecondaryTargetActionUrlsForConfigMapper in src/Element/LingotekTargetStatuses.php
Get secondary target actions, which will be shown when expanded.

File

src/Element/LingotekTargetStatuses.php, line 430

Class

LingotekTargetStatuses
Provides a Lingotek target status element.

Namespace

Drupal\lingotek\Element

Code

protected function getActionUrlArgumentsForConfigMapper(ConfigMapperInterface &$mapper) {
  $args = [
    'entity_type' => $mapper
      ->getPluginId(),
    'entity_id' => $mapper
      ->getPluginId(),
  ];
  if ($mapper instanceof ConfigEntityMapper && !$mapper instanceof ConfigFieldMapper) {
    $args['entity_id'] = $mapper
      ->getEntity()
      ->id();
  }
  elseif ($mapper instanceof ConfigFieldMapper) {
    $args['entity_type'] = $mapper
      ->getType();
    $args['entity_id'] = $mapper
      ->getEntity()
      ->id();
  }
  return $args;
}