public function InstallablePluginBase::buildStatus in Markdown 8.2
Builds a display status based on the current state of the plugin.
Parameters
bool $all: Flag indicating whether to build status for all potential libraries.
Return value
\Drupal\Component\Render\MarkupInterface
Overrides InstallablePluginInterface::buildStatus
File
- src/
Plugin/ Markdown/ InstallablePluginBase.php, line 53
Class
- InstallablePluginBase
- Base class for installable plugins.
Namespace
Drupal\markdown\Plugin\MarkdownCode
public function buildStatus($all = FALSE) {
$build = [
'#theme_wrappers' => [
'container__installable_libraries',
],
'#attributes' => [
'class' => [
'installable-libraries',
],
],
];
$libraries = $all ? $this->pluginDefinition->libraries : [
$this
->getInstalledLibrary() ?: $this
->getPreferredLibrary(),
];
foreach ($libraries as $library) {
$build[] = [
'#theme' => 'installable_library',
'#plugin' => $this,
'#library' => $library,
];
}
return $build;
}