public function EntityPrintPluginManager::isPrintEngineEnabled in Entity Print 8.2
Checks if a plugin is enabled based on its dependencies.
Parameters
string $plugin_id: The plugin id to check.
Return value
bool TRUE if the plugin is disabled otherwise FALSE.
Overrides EntityPrintPluginManagerInterface::isPrintEngineEnabled
File
- src/
Plugin/ EntityPrintPluginManager.php, line 111
Class
- EntityPrintPluginManager
- Entity print plugin manager.
Namespace
Drupal\entity_print\PluginCode
public function isPrintEngineEnabled($plugin_id) {
if (!$plugin_id) {
return FALSE;
}
// If the plugin definition has gone, it obviously isn't enabled.
$plugin_definition = $this
->getDefinition($plugin_id, FALSE);
if (!$plugin_definition) {
return FALSE;
}
$disabled_definitions = $this
->getDisabledDefinitions($plugin_definition['export_type']);
return !in_array($plugin_id, array_keys($disabled_definitions), TRUE);
}