public static function HeadingPermalinkExtension::defaultSettings in Markdown 8.2
Provides the default settings for the plugin.
Parameters
\Drupal\markdown\Annotation\InstallablePlugin $pluginDefinition: The plugin definition.
Return value
array The default settings.
Overrides SettingsTrait::defaultSettings
File
- src/
Plugin/ Markdown/ CommonMark/ Extension/ HeadingPermalinkExtension.php, line 48
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\ExtensionCode
public static function defaultSettings($pluginDefinition) {
/* @var \Drupal\markdown\Annotation\InstallablePlugin $pluginDefinition */
$innerContents = '';
if (defined('\\League\\CommonMark\\Extension\\HeadingPermalink\\HeadingPermalinkRenderer::DEFAULT_INNER_CONTENTS')) {
/* @noinspection PhpFullyQualifiedNameUsageInspection */
$innerContents = \League\CommonMark\Extension\HeadingPermalink\HeadingPermalinkRenderer::DEFAULT_INNER_CONTENTS;
// phpcs:ignore
}
return [
'html_class' => 'heading-permalink',
'id_prefix' => 'user-content',
'inner_contents' => $innerContents,
'insert' => 'before',
'title' => 'Permalink',
];
}