WebformEntityPrintWebformExporterDeriver.php in Webform 6.x
File
modules/webform_entity_print/src/Plugin/Derivative/WebformEntityPrintWebformExporterDeriver.php
View source
<?php
namespace Drupal\webform_entity_print\Plugin\Derivative;
class WebformEntityPrintWebformExporterDeriver extends WebformEntityPrintWebformDeriverBase {
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]['id'] = $id;
$this->derivatives[$id]['label'] = $this
->t('@label documents', $t_args);
$this->derivatives[$id]['description'] = $this
->t('Exports results as @label documents', $t_args);
}
return $this->derivatives;
}
}