You are here

class WebformEntityPrintWebformExporterDeriver in Webform 8.5

Same name and namespace in other branches
  1. 6.x modules/webform_entity_print/src/Plugin/Derivative/WebformEntityPrintWebformExporterDeriver.php \Drupal\webform_entity_print\Plugin\Derivative\WebformEntityPrintWebformExporterDeriver

Provides webform entity print attachment webform exporter derivatives.

Hierarchy

Expanded class hierarchy of WebformEntityPrintWebformExporterDeriver

See also

\Drupal\webform_entity_print\Plugin\WebformExporter\WebformEntityPrintWebformExporter

File

modules/webform_entity_print/src/Plugin/Derivative/WebformEntityPrintWebformExporterDeriver.php, line 10

Namespace

Drupal\webform_entity_print\Plugin\Derivative
View source
class WebformEntityPrintWebformExporterDeriver extends WebformEntityPrintWebformDeriverBase {

  /**
   * {@inheritdoc}
   */
  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;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
DeriverBase::$derivatives protected property List of derivative definitions. 1
DeriverBase::getDerivativeDefinition public function Gets the definition of a derivative plugin. Overrides DeriverInterface::getDerivativeDefinition
StringTranslationTrait::$stringTranslation protected property The string translation service. 1
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use. 2
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.
WebformEntityPrintWebformDeriverBase::$exportTypeManager protected property The entity print export type manager.
WebformEntityPrintWebformDeriverBase::create public static function Creates a new class instance. Overrides ContainerDeriverInterface::create
WebformEntityPrintWebformDeriverBase::getDefinitions protected function Get export type definitions.
WebformEntityPrintWebformDeriverBase::__construct public function Constructs new WebformEntityPrintWebformDeriverBase.
WebformEntityPrintWebformExporterDeriver::getDerivativeDefinitions public function Gets the definition of all derivatives of a base plugin. Overrides WebformEntityPrintWebformDeriverBase::getDerivativeDefinitions