public function SelectionBase::getDerivativeDefinitions in Multi-path autocomplete 8
Implements DerivativeInterface::getDerivativeDefinitions().
1 call to SelectionBase::getDerivativeDefinitions()
- SelectionBase::getDerivativeDefinition in lib/
Drupal/ mpac/ Plugin/ Derivative/ SelectionBase.php - Implements DerivativeInterface::getDerivativeDefinition().
File
- lib/
Drupal/ mpac/ Plugin/ Derivative/ SelectionBase.php, line 38 - Contains \Drupal\mpac\Plugin\Derivative\SelectionBase.
Class
- SelectionBase
- Base class for selection plugins provided by Multi-path autocomplete.
Namespace
Drupal\mpac\Plugin\DerivativeCode
public function getDerivativeDefinitions(array $base_plugin_definition) {
$supported_types = array(
'path',
'shortcut',
);
foreach (mpac_selection_plugin_info() as $type => $info) {
if (!in_array($type, $supported_types)) {
$this->derivatives[$type] = $base_plugin_definition;
$this->derivatives[$type]['label'] = t('@type selection', array(
'@type' => $info['label'],
));
}
}
return $this->derivatives;
}