You are here

interface ParserInterface in Markdown 8.2

Interface for defining markdown parsers.

@method \Drupal\markdown\Annotation\MarkdownParser getPluginDefinition()

Hierarchy

Expanded class hierarchy of ParserInterface

All classes that implement ParserInterface

24 files declare their use of ParserInterface
AllowedHtmlManager.php in src/PluginManager/AllowedHtmlManager.php
EmojiExtension.php in src/Plugin/Markdown/CommonMark/Extension/EmojiExtension.php
ExternalLinkExtension.php in src/Plugin/Markdown/CommonMark/Extension/ExternalLinkExtension.php
FilterAlign.php in src/Plugin/Markdown/AllowedHtml/FilterAlign.php
FilterCaption.php in src/Plugin/Markdown/AllowedHtml/FilterCaption.php

... See full list

File

src/Plugin/Markdown/ParserInterface.php, line 13

Namespace

Drupal\markdown\Plugin\Markdown
View source
interface ParserInterface extends EnabledPluginInterface, RefinableCacheableDependencyInterface, RenderStrategyInterface, SettingsInterface {

  /**
   * Parses markdown into HTML.
   *
   * @param string $markdown
   *   The markdown string to parse.
   * @param \Drupal\Core\Language\LanguageInterface $language
   *   Optional. The language of the markdown to be parsed.
   *
   * @return \Drupal\markdown\Render\ParsedMarkdownInterface
   *   A safe ParsedMarkdown object.
   *
   * @see \Drupal\markdown\Render\ParsedMarkdownInterface
   */
  public function parse($markdown, LanguageInterface $language = NULL);

}

Members

Namesort descending Modifiers Type Description Overrides
AnnotatedPluginInterface::getConfigurationOverrides public function Retrieves the configuration overrides for the plugin. 1
AnnotatedPluginInterface::getDescription public function Retrieves the description of the plugin, if set. 1
AnnotatedPluginInterface::getOriginalPluginId public function Retrieves the original plugin identifier. 1
AnnotatedPluginInterface::getProvider public function Returns the provider (extension name) of the plugin. 1
AnnotatedPluginInterface::getWeight public function Returns the weight of the plugin (used for sorting). 1
CacheableDependencyInterface::getCacheContexts public function The cache contexts associated with this object. 34
CacheableDependencyInterface::getCacheMaxAge public function The maximum age for which this object may be cached. 34
CacheableDependencyInterface::getCacheTags public function The cache tags associated with this object. 27
ConfigurableInterface::defaultConfiguration public function Gets default configuration for this plugin. Overrides ConfigurableInterface::defaultConfiguration 1
ConfigurableInterface::getConfiguration public function Gets this plugin's configuration. Overrides ConfigurableInterface::getConfiguration 1
ConfigurableInterface::setConfiguration public function Sets the configuration for this plugin instance. Overrides ConfigurableInterface::setConfiguration 1
ContainerFactoryPluginInterface::create public static function Creates an instance of the plugin. 112
DependentPluginInterface::calculateDependencies public function Calculates dependencies for the configured plugin. 19
EnabledPluginInterface::enabledByDefault public function Indicates the default "enabled" state.
EnabledPluginInterface::isEnabled public function Indicates whether the plugin is enabled.
InstallablePluginInterface::buildLibrary public function Builds a display for a library. 1
InstallablePluginInterface::buildStatus public function Builds a display status based on the current state of the plugin. 1
InstallablePluginInterface::config public function Retrieves the config instance for this plugin. 1
InstallablePluginInterface::getDeprecated public function Retrieves the deprecation message, if any. 1
InstallablePluginInterface::getExperimental public function Retrieves the experimental message. 1
InstallablePluginInterface::getInstalledId public function Retrieves the composer package name of the installable library, if any. 1
InstallablePluginInterface::getInstalledLibrary public function Retrieves the installed library used by the plugin. 1
InstallablePluginInterface::getLabel public function Displays the human-readable label of the plugin. Overrides AnnotatedPluginInterface::getLabel
InstallablePluginInterface::getLink public function Retrieves the plugin as a link using its label and URL. 1
InstallablePluginInterface::getObject public function Instantiates a new instance of the object defined by the installed library. 1
InstallablePluginInterface::getObjectClass public function Retrieves the class name of the object defined by the installed library. 1
InstallablePluginInterface::getPreferredLibrary public function Retrieves the preferred library of the plugin. 1
InstallablePluginInterface::getSortedConfiguration public function Retrieves the configuration for the plugin, but sorted. 1
InstallablePluginInterface::getUrl public function Retrieves the URL of the plugin, if set. 1
InstallablePluginInterface::getVersion public function The current version of the plugin. 1
InstallablePluginInterface::hasMultipleLibraries public function Indicates whether plugin has multiple installs to check. 1
InstallablePluginInterface::isInstalled public function Indicates whether the plugin is installed. 1
InstallablePluginInterface::isPreferred public function Indicates whether the plugin is using the preferred library. 1
InstallablePluginInterface::isPreferredLibraryInstalled public function Indicates whether the preferred library is installed. 1
InstallablePluginInterface::showInUi public function Indicates whether the plugin should be shown in the UI. 1
ParserInterface::parse public function Parses markdown into HTML. 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
RefinableCacheableDependencyInterface::addCacheableDependency public function Adds a dependency on an object: merges its cacheability metadata. 1
RefinableCacheableDependencyInterface::addCacheContexts public function Adds cache contexts. 1
RefinableCacheableDependencyInterface::addCacheTags public function Adds cache tags. 1
RefinableCacheableDependencyInterface::mergeCacheMaxAge public function Merges the maximum age (in seconds) with the existing maximum age. 1
RenderStrategyInterface::DOCUMENTATION_URL constant The documentation URL for further explaining render strategies.
RenderStrategyInterface::ESCAPE_INPUT constant Strategy used to escape HTML input prior to parsing markdown.
RenderStrategyInterface::FILTER_OUTPUT constant Strategy used to filter the output of parsed markdown.
RenderStrategyInterface::getAllowedHtml Deprecated public function Retrieves the custom (user provided) allowed HTML. 2
RenderStrategyInterface::getAllowedHtmlPlugins public function Retrieves the allowed HTML plugins relevant to the object. 2
RenderStrategyInterface::getCustomAllowedHtml public function Retrieves the custom (user provided) allowed HTML. 2
RenderStrategyInterface::getRenderStrategy public function Retrieves the render strategy to use. 2
RenderStrategyInterface::MARKDOWN_XSS_URL Deprecated constant The URL for explaining Markdown and XSS; render strategies.
RenderStrategyInterface::NONE constant No render strategy.
RenderStrategyInterface::STRIP_INPUT constant Strategy used to remove HTML input prior to parsing markdown.
SettingsInterface::defaultSettings public static function Provides the default settings for the plugin.
SettingsInterface::getDefaultSetting public function Retrieves the default value for the setting.
SettingsInterface::getSetting public function Retrieves a setting for the plugin.
SettingsInterface::getSettingOverrides public function
SettingsInterface::getSettings public function Retrieves the current settings. 1
SettingsInterface::settingExists public function Flag indicating whether a setting exists.
SettingsInterface::settingsKey public function The array key name to use when the settings are nested in another array.