You are here

interface FillPdfActionPluginInterface in FillPDF 8.4

Same name and namespace in other branches
  1. 5.0.x src/Plugin/FillPdfActionPluginInterface.php \Drupal\fillpdf\Plugin\FillPdfActionPluginInterface

Defines an interface for FillPDF action plugins.

Action plugins must ultimately return a \Symfony\Component\HttpFoundation\Response. They may provide additional methods to provide callers with additional plugin-specific metadata.

They may also have side effects, such as saving a file to the file system. They must not, however, end the request.

@todo Extend ConfigurableInterface once drupal:8.6.x is no longer supported.

Hierarchy

Expanded class hierarchy of FillPdfActionPluginInterface

All classes that implement FillPdfActionPluginInterface

File

src/Plugin/FillPdfActionPluginInterface.php, line 22

Namespace

Drupal\fillpdf\Plugin
View source
interface FillPdfActionPluginInterface extends PluginInspectionInterface, DependentPluginInterface, ContainerFactoryPluginInterface, ExecutableInterface {

  /**
   * Take action according to the plugin configuration.
   *
   * This will vary for each action plugin, but it should do something with the
   * PDF (e.g. prepare a download response, save it to a file, etc.) and return
   * an appropriate Response (or subclass thereof, such as RedirectResponse) to
   * the caller.
   *
   * When you need context info, see if it is passed to you in
   * $this->configuration.
   *
   * @return \Symfony\Component\HttpFoundation\Response
   *   A response.
   *
   * @todo Document exceptions thrown if something goes wrong.
   */
  public function execute();

}

Members

Namesort descending Modifiers Type Description Overrides
ContainerFactoryPluginInterface::create public static function Creates an instance of the plugin. 112
DependentPluginInterface::calculateDependencies public function Calculates dependencies for the configured plugin. 19
FillPdfActionPluginInterface::execute public function Take action according to the plugin configuration. Overrides ExecutableInterface::execute 2
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2