You are here

abstract class FillPdfActionPluginBase in FillPDF 5.0.x

Same name and namespace in other branches
  1. 8.4 src/Plugin/FillPdfActionPluginBase.php \Drupal\fillpdf\Plugin\FillPdfActionPluginBase

Base class for FillPDF action plugins.

Hierarchy

Expanded class hierarchy of FillPdfActionPluginBase

2 files declare their use of FillPdfActionPluginBase
FillPdfDownloadAction.php in src/Plugin/FillPdfActionPlugin/FillPdfDownloadAction.php
FillPdfSaveAction.php in src/Plugin/FillPdfActionPlugin/FillPdfSaveAction.php

File

src/Plugin/FillPdfActionPluginBase.php, line 11

Namespace

Drupal\fillpdf\Plugin
View source
abstract class FillPdfActionPluginBase extends PluginBase implements FillPdfActionPluginInterface {

  /**
   * {@inheritdoc}
   */
  public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
    return new static($configuration, $plugin_id, $plugin_definition);
  }

  /**
   * {@inheritdoc}
   */
  public function calculateDependencies() {
    return [];
  }

  /**
   * Gets this plugin's configuration.
   *
   * @return array
   *   An array of this plugin's configuration.
   *
   * @todo Remove superfluous docs once drupal:8.6.x is no longer supported.
   * @deprecated in fillpdf:8.x-4.8 and is removed from fillpdf:8.x-5.0. Custom
   *   FillPdfActionPlugins may implement ConfigurableInterface instead.
   * @see https://www.drupal.org/project/fillpdf/issues/3058862
   * @see \Drupal\Component\Plugin\ConfigurableInterface::getConfiguration()
   */
  public function getConfiguration() {
    @trigger_error('FillPdfActionPluginInterface::getConfiguration() is deprecated in fillpdf:8.x-4.8 and is removed from fillpdf:8.x-5.0. Custom FillPdfActionPlugins may extend ConfigurableInterface instead. See https://www.drupal.org/project/fillpdf/issues/3058862', E_USER_DEPRECATED);
    return $this->configuration;
  }

  /**
   * Sets the configuration for this plugin instance.
   *
   * @param array $configuration
   *   An associative array containing the plugin's configuration.
   *
   * @todo Remove superfluous docs once drupal:8.6.x is no longer supported.
   * @deprecated in fillpdf:8.x-4.8 and is removed from fillpdf:8.x-5.0. Custom
   *   FillPdfActionPlugins may implement ConfigurableInterface instead.
   * @see https://www.drupal.org/project/fillpdf/issues/3058862
   * @see \Drupal\Component\Plugin\ConfigurableInterface::setConfiguration()
   */
  public function setConfiguration(array $configuration) {
    @trigger_error('FillPdfActionPluginInterface::setConfiguration() is deprecated in fillpdf:8.x-4.8 and is removed from fillpdf:8.x-5.0. Custom FillPdfActionPlugins may extend ConfigurableInterface instead. See https://www.drupal.org/project/fillpdf/issues/3058862', E_USER_DEPRECATED);
    $this->configuration = $configuration;
  }

  /**
   * Gets default configuration for this plugin.
   *
   * @return array
   *   An associative array with the default configuration.
   *
   * @todo Remove superfluous docs once drupal:8.6.x is no longer supported.
   * @deprecated in fillpdf:8.x-4.8 and is removed from fillpdf:8.x-5.0. Custom
   *   FillPdfActionPlugins may implement ConfigurableInterface instead.
   * @see https://www.drupal.org/project/fillpdf/issues/3058862
   * @see \Drupal\Component\Plugin\ConfigurableInterface::defaultConfiguration()
   */
  public function defaultConfiguration() {
    @trigger_error('FillPdfActionPluginInterface::defaultConfiguration() is deprecated in fillpdf:8.x-4.8 and is removed from fillpdf:8.x-5.0. Custom FillPdfActionPlugins may extend ConfigurableInterface instead. See https://www.drupal.org/project/fillpdf/issues/3058862', E_USER_DEPRECATED);
    return [];
  }

  /**
   * {@inheritdoc}
   *
   * @todo Remove once drupal:8.6.x is no longer supported.
   * @see https://www.drupal.org/project/fillpdf/issues/3058862
   */
  public function isConfigurable() {
    @trigger_error('FillPdfActionPluginBase::isConfigurable() is deprecated in fillpdf:8.x-4.8 and is removed from fillpdf:8.x-5.0. Custom FillPdfActionPlugins may extend ConfigurableInterface instead. See https://www.drupal.org/project/fillpdf/issues/3058862', E_USER_DEPRECATED);
    return TRUE;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
FillPdfActionPluginBase::calculateDependencies public function Calculates dependencies for the configured plugin. Overrides DependentPluginInterface::calculateDependencies
FillPdfActionPluginBase::create public static function Creates an instance of the plugin. Overrides ContainerFactoryPluginInterface::create 1
FillPdfActionPluginBase::defaultConfiguration Deprecated public function Gets default configuration for this plugin.
FillPdfActionPluginBase::getConfiguration Deprecated public function Gets this plugin's configuration.
FillPdfActionPluginBase::isConfigurable public function @todo Remove once drupal:8.6.x is no longer supported. Overrides PluginBase::isConfigurable
FillPdfActionPluginBase::setConfiguration Deprecated public function Sets the configuration for this plugin instance.
FillPdfActionPluginInterface::execute public function Take action according to the plugin configuration. Overrides ExecutableInterface::execute 2
PluginBase::$configuration protected property Configuration information passed into the plugin. 1
PluginBase::$pluginDefinition protected property The plugin implementation definition. 1
PluginBase::$pluginId protected property The plugin_id.
PluginBase::DERIVATIVE_SEPARATOR constant A string which is used to separate base plugin IDs from the derivative ID.
PluginBase::getBaseId public function Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface::getBaseId
PluginBase::getDerivativeId public function Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface::getDerivativeId
PluginBase::getPluginDefinition public function Gets the definition of the plugin implementation. Overrides PluginInspectionInterface::getPluginDefinition 2
PluginBase::getPluginId public function Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface::getPluginId
PluginBase::__construct public function Constructs a \Drupal\Component\Plugin\PluginBase object. 98