public function ContentEntityLingotekActionDeriver::getDerivativeDefinitions in Lingotek Translation 4.0.x
Same name and namespace in other branches
- 8.2 src/Plugin/Action/Derivative/ContentEntityLingotekActionDeriver.php \Drupal\lingotek\Plugin\Action\Derivative\ContentEntityLingotekActionDeriver::getDerivativeDefinitions()
- 3.0.x src/Plugin/Action/Derivative/ContentEntityLingotekActionDeriver.php \Drupal\lingotek\Plugin\Action\Derivative\ContentEntityLingotekActionDeriver::getDerivativeDefinitions()
- 3.1.x src/Plugin/Action/Derivative/ContentEntityLingotekActionDeriver.php \Drupal\lingotek\Plugin\Action\Derivative\ContentEntityLingotekActionDeriver::getDerivativeDefinitions()
- 3.2.x src/Plugin/Action/Derivative/ContentEntityLingotekActionDeriver.php \Drupal\lingotek\Plugin\Action\Derivative\ContentEntityLingotekActionDeriver::getDerivativeDefinitions()
- 3.3.x src/Plugin/Action/Derivative/ContentEntityLingotekActionDeriver.php \Drupal\lingotek\Plugin\Action\Derivative\ContentEntityLingotekActionDeriver::getDerivativeDefinitions()
- 3.4.x src/Plugin/Action/Derivative/ContentEntityLingotekActionDeriver.php \Drupal\lingotek\Plugin\Action\Derivative\ContentEntityLingotekActionDeriver::getDerivativeDefinitions()
- 3.5.x src/Plugin/Action/Derivative/ContentEntityLingotekActionDeriver.php \Drupal\lingotek\Plugin\Action\Derivative\ContentEntityLingotekActionDeriver::getDerivativeDefinitions()
- 3.6.x src/Plugin/Action/Derivative/ContentEntityLingotekActionDeriver.php \Drupal\lingotek\Plugin\Action\Derivative\ContentEntityLingotekActionDeriver::getDerivativeDefinitions()
- 3.7.x src/Plugin/Action/Derivative/ContentEntityLingotekActionDeriver.php \Drupal\lingotek\Plugin\Action\Derivative\ContentEntityLingotekActionDeriver::getDerivativeDefinitions()
- 3.8.x src/Plugin/Action/Derivative/ContentEntityLingotekActionDeriver.php \Drupal\lingotek\Plugin\Action\Derivative\ContentEntityLingotekActionDeriver::getDerivativeDefinitions()
Gets the definition of all derivatives of a base plugin.
Parameters
array $base_plugin_definition: The definition array of the base plugin.
Return value
array An array of full derivative definitions keyed on derivative id.
Overrides EntityActionDeriverBase::getDerivativeDefinitions
See also
getDerivativeDefinition()
File
- src/
Plugin/ Action/ Derivative/ ContentEntityLingotekActionDeriver.php, line 27
Class
Namespace
Drupal\lingotek\Plugin\Action\DerivativeCode
public function getDerivativeDefinitions($base_plugin_definition) {
$definitions = parent::getDerivativeDefinitions($base_plugin_definition);
if (!empty($definitions)) {
$entity_types = $this->entityTypeManager
->getDefinitions();
foreach ($this->derivatives as $entity_type_id => &$definition) {
$definition['label'] = new FormattableMarkup($base_plugin_definition['action_label'], [
'@entity_label' => $entity_types[$entity_type_id]
->getSingularLabel(),
]);
if (in_array($definition['class'], [
DeleteAllTranslationsAction::class,
DeleteTranslationLingotekAction::class,
])) {
$definition['confirm_form_route_name'] = 'entity.' . $entity_type_id . '.delete_multiple_form';
}
}
}
return parent::getDerivativeDefinitions($base_plugin_definition);
}