You are here

interface FreelinkingPluginInterface in Freelinking 8.3

Same name and namespace in other branches
  1. 4.0.x src/Plugin/FreelinkingPluginInterface.php \Drupal\freelinking\Plugin\FreelinkingPluginInterface

Describes the Freelinking plugin.

Hierarchy

Expanded class hierarchy of FreelinkingPluginInterface

All classes that implement FreelinkingPluginInterface

3 files declare their use of FreelinkingPluginInterface
FreelinkingManager.php in src/FreelinkingManager.php
FreelinkingManagerInterface.php in src/FreelinkingManagerInterface.php
NodeTitle.php in src/Plugin/freelinking/NodeTitle.php

File

src/Plugin/FreelinkingPluginInterface.php, line 13

Namespace

Drupal\freelinking\Plugin
View source
interface FreelinkingPluginInterface extends ConfigurableInterface, DependentPluginInterface, PluginInspectionInterface {

  /**
   * Provides tips for this freelinking plugin.
   *
   * Tips are displayed as part of the freelinking filter plugin.
   *
   * @return \Drupal\Core\StringTranslation\TranslatableMarkup
   *   Translatable markup.
   */
  public function getTip();

  /**
   * A regular expression string to indicate what to replace for this plugin.
   *
   * @return string
   *   A regular expression string.
   */
  public function getIndicator();

  /**
   * Plugin configuration form.
   *
   * @param array $form
   *   The form element array for the filter plugin.
   * @param \Drupal\Core\Form\FormStateInterface $form_state
   *   The form state of the parent form.
   *
   * @return array
   *   The configuration form to attach to Freelinking settings form.
   */
  public function settingsForm(array $form, FormStateInterface $form_state);

  /**
   * Build a link with the plugin.
   *
   * @param array $target
   *   The target array with including the following keys:
   *   - text: The text to display in the URL.
   *   - indicator: The indicator string.
   *   - dest: The destination string for the plugin to turn into a URI.
   *   - tooltip: An optional tooltip.
   *   - language: A language object.
   *
   * @return array
   *   Link array.
   */
  public function buildLink(array $target);

  /**
   * Determine if the plugin is built-in (always on).
   *
   * @return bool
   *   TRUE if the plugin is hidden from filter configuration.
   */
  public function isHidden();

  /**
   * Get the failover plugin ID (if applicable).
   *
   * @return string
   *   The plugin ID of the failover plugin or an empty string if no plugin
   *   available.
   */
  public function getFailoverPluginId();

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigurableInterface::defaultConfiguration public function Gets default configuration for this plugin. 11
ConfigurableInterface::getConfiguration public function Gets this plugin's configuration. 12
ConfigurableInterface::setConfiguration public function Sets the configuration for this plugin instance. 12
DependentPluginInterface::calculateDependencies public function Calculates dependencies for the configured plugin. 19
FreelinkingPluginInterface::buildLink public function Build a link with the plugin. 11
FreelinkingPluginInterface::getFailoverPluginId public function Get the failover plugin ID (if applicable). 1
FreelinkingPluginInterface::getIndicator public function A regular expression string to indicate what to replace for this plugin. 11
FreelinkingPluginInterface::getTip public function Provides tips for this freelinking plugin. 11
FreelinkingPluginInterface::isHidden public function Determine if the plugin is built-in (always on). 1
FreelinkingPluginInterface::settingsForm public function Plugin configuration form. 1
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