protected function BaseExtensibleParser::isExtensionRequired in Markdown 8.2
Indicates whether an extension is "required" by another extension.
Parameters
\Drupal\markdown\Plugin\Markdown\ExtensionInterface $extension: The extension to check.
Return value
bool TRUE or FALSE
1 call to BaseExtensibleParser::isExtensionRequired()
- BaseExtensibleParser::getPluginDependencies in src/
Plugin/ Markdown/ BaseExtensibleParser.php
File
- src/
Plugin/ Markdown/ BaseExtensibleParser.php, line 122
Class
- BaseExtensibleParser
- Base class for extensible markdown parsers.
Namespace
Drupal\markdown\Plugin\MarkdownCode
protected function isExtensionRequired(ExtensionInterface $extension) {
// Check whether extension is required by another enabled extension.
if ($requiredBy = $extension
->requiredBy()) {
foreach ($requiredBy as $dependent) {
if ($this
->extension($dependent)
->isEnabled()) {
return TRUE;
}
}
}
return FALSE;
}