You are here

class WebformEntityPrintAttachmentDeriver in Webform 8.5

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

Provides webform entity print attachment webform element derivatives.

Hierarchy

Expanded class hierarchy of WebformEntityPrintAttachmentDeriver

See also

\Drupal\webform_entity_print_attachment\Plugin\WebformElement\WebformEntityPrintAttachmentWebformElement

File

modules/webform_entity_print_attachment/src/Plugin/Derivative/WebformEntityPrintAttachmentDeriver.php, line 12

Namespace

Drupal\webform_entity_print_attachment\Plugin\Derivative
View source
class WebformEntityPrintAttachmentDeriver 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]['label'] = $this
        ->t('Attachment @label', $t_args);
      $this->derivatives[$id]['description'] = $this
        ->t('Generates a @label attachment.', $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.
WebformEntityPrintAttachmentDeriver::getDerivativeDefinitions public function Gets the definition of all derivatives of a base plugin. Overrides WebformEntityPrintWebformDeriverBase::getDerivativeDefinitions
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.