You are here

public function HeadingPermalinkExtension::allowedHtmlTags in Markdown 8.2

Retrieves the allowed HTML tags.

Parameters

\Drupal\markdown\Plugin\Markdown\ParserInterface $parser: The parser associated with this plugin.

\Drupal\Core\Theme\ActiveTheme $activeTheme: Optional. The active them. This is used as an indicator when in "render mode".

Return value

array An associative array of allowed HTML tags.

Overrides AllowedHtmlInterface::allowedHtmlTags

File

src/Plugin/Markdown/CommonMark/Extension/HeadingPermalinkExtension.php, line 69

Class

HeadingPermalinkExtension
Plugin annotation @MarkdownAllowedHtml( id = "commonmark-heading-permalink", ) @MarkdownExtension( id = "commonmark-heading-permalink", label = @Translation("Heading Permalink"), description = @Translation("Makes all heading elements…

Namespace

Drupal\markdown\Plugin\Markdown\CommonMark\Extension

Code

public function allowedHtmlTags(ParserInterface $parser, ActiveTheme $activeTheme = NULL) {
  $tags = [];
  if ($parser instanceof ExtensibleParserInterface && ($extension = $parser
    ->extension($this
    ->getPluginId())) && $extension instanceof SettingsInterface) {
    $tags = FilterHtml::tagsFromHtml($extension
      ->getSetting('inner_contents'));
  }
  return $tags;
}