public function WebformEntityPrintAttachmentDeriver::getDerivativeDefinitions in Webform 6.x
Same name and namespace in other branches
- 8.5 modules/webform_entity_print_attachment/src/Plugin/Derivative/WebformEntityPrintAttachmentDeriver.php \Drupal\webform_entity_print_attachment\Plugin\Derivative\WebformEntityPrintAttachmentDeriver::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 WebformEntityPrintWebformDeriverBase::getDerivativeDefinitions
See also
getDerivativeDefinition()
File
- modules/
webform_entity_print_attachment/ src/ Plugin/ Derivative/ WebformEntityPrintAttachmentDeriver.php, line 17
Class
- WebformEntityPrintAttachmentDeriver
- Provides webform entity print attachment webform element derivatives.
Namespace
Drupal\webform_entity_print_attachment\Plugin\DerivativeCode
public function getDerivativeDefinitions($base_plugin_definition) {
$definitions = $this
->getDefinitions();
foreach ($definitions as $id => $definition) {
$t_args = [
'@label' => $definition['label'],
];
$this->derivatives[$id] = $base_plugin_definition;
$this->derivatives[$id]['label'] = $this
->t('Attachment @label', $t_args);
$this->derivatives[$id]['description'] = $this
->t('Generates a @label attachment.', $t_args);
}
return $this->derivatives;
}