You are here

interface MarkdownExtensionInterface in Markdown 3.0.x

Interface ExtensionInterface.

Hierarchy

Expanded class hierarchy of MarkdownExtensionInterface

All classes that implement MarkdownExtensionInterface

1 file declares its use of MarkdownExtensionInterface
MarkdownExtensionManager.php in src/MarkdownExtensionManager.php

File

src/Plugin/Markdown/Extension/MarkdownExtensionInterface.php, line 12

Namespace

Drupal\markdown\Plugin\Markdown\Extension
View source
interface MarkdownExtensionInterface extends MarkdownInstallablePluginInterface {

  /**
   * Retrieves the default settings.
   *
   * @return array
   *   The default settings.
   */
  public function defaultSettings();

  /**
   * Retrieves a setting.
   *
   * @param string $name
   *   The name of the setting to retrieve.
   *
   * @return mixed
   *   The settings value or NULL if not set.
   */
  public function getSetting($name);

  /**
   * Retrieves the current settings.
   *
   * @return array
   *   The settings array
   */
  public function getSettings();

  /**
   * Indicates whether the extension is being used.
   *
   * @return bool
   *   TRUE or FALSE
   */
  public function isEnabled();

  /**
   * Sets a specific setting.
   *
   * @param string $name
   *   The name of the setting to set.
   * @param mixed $value
   *   (optional) The value to set. If not provided it will be removed.
   */
  public function setSetting($name, $value = NULL);

  /**
   * Provides settings to an extension.
   *
   * @param array $settings
   *   The settings array.
   */
  public function setSettings(array $settings = []);

  /**
   * Returns the configuration form elements specific to this plugin.
   *
   * @param array $element
   *   The element render array for the extension configuration form.
   * @param \Drupal\Core\Form\FormStateInterface $formState
   *   The current state of the form.
   * @param \Drupal\markdown\Plugin\Filter\MarkdownFilterInterface $filter
   *   The filter this form belongs to.
   *
   * @return array
   *   The renderable form array representing the entire configuration form.
   */
  public function settingsForm(array $element, FormStateInterface $formState, MarkdownFilterInterface $filter);

}

Members

Namesort descending Modifiers Type Description Overrides
MarkdownExtensionInterface::defaultSettings public function Retrieves the default settings. 1
MarkdownExtensionInterface::getSetting public function Retrieves a setting. 1
MarkdownExtensionInterface::getSettings public function Retrieves the current settings. 1
MarkdownExtensionInterface::isEnabled public function Indicates whether the extension is being used. 1
MarkdownExtensionInterface::setSetting public function Sets a specific setting. 1
MarkdownExtensionInterface::setSettings public function Provides settings to an extension. 1
MarkdownExtensionInterface::settingsForm public function Returns the configuration form elements specific to this plugin. 1
MarkdownInstallablePluginInterface::getDescription public function Retrieves the description of the plugin, if set. 2
MarkdownInstallablePluginInterface::getLabel public function Displays the human-readable label of the plugin. 2
MarkdownInstallablePluginInterface::getUrl public function Retrieves the URL of the plugin, if set. 2
MarkdownInstallablePluginInterface::getVersion public function The current version of the parser. 2
MarkdownInstallablePluginInterface::installed public static function Indicates whether the parser is installed. 2
MarkdownInstallablePluginInterface::isInstalled public function Indicates whether the parser is installed. 2
MarkdownInstallablePluginInterface::version public static function Retrieves the version of the installed parser. 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