class MutableQualityToolkitManager in Image Style Quality 8
Manage setting quality values on different toolkits.
Hierarchy
- class \Drupal\Component\Plugin\PluginManagerBase implements PluginManagerInterface uses DiscoveryTrait
- class \Drupal\image_style_quality\MutableQualityToolkitManager implements MutableQualityToolkitManagerInterface
Expanded class hierarchy of MutableQualityToolkitManager
1 string reference to 'MutableQualityToolkitManager'
1 service uses MutableQualityToolkitManager
File
- src/
MutableQualityToolkitManager.php, line 13
Namespace
Drupal\image_style_qualityView source
class MutableQualityToolkitManager extends PluginManagerBase implements MutableQualityToolkitManagerInterface {
/**
* Config factory.
*
* @var \Drupal\Core\Config\ConfigFactoryInterface
*/
protected $configFactory;
/**
* Constructs a new MutableQualityToolkitManager instance.
*/
public function __construct(ModuleHandlerInterface $module_handler, ConfigFactoryInterface $config_factory) {
$this->discovery = new YamlDiscovery('mutable_quality_toolkits', $module_handler
->getModuleDirectories());
$this->configFactory = $config_factory;
}
/**
* {@inheritdoc}
*/
public function getActiveToolkit() {
return $this
->getDefinition($this->configFactory
->get('system.image')
->get('toolkit'));
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DiscoveryTrait:: |
protected | function | Gets a specific plugin definition. | |
DiscoveryTrait:: |
public | function | ||
MutableQualityToolkitManager:: |
protected | property | Config factory. | |
MutableQualityToolkitManager:: |
public | function |
Get the toolkit definition that is currently active on the site. Overrides MutableQualityToolkitManagerInterface:: |
|
MutableQualityToolkitManager:: |
public | function | Constructs a new MutableQualityToolkitManager instance. | |
PluginManagerBase:: |
protected | property | The object that discovers plugins managed by this manager. | |
PluginManagerBase:: |
protected | property | The object that instantiates plugins managed by this manager. | |
PluginManagerBase:: |
protected | property | The object that returns the preconfigured plugin instance appropriate for a particular runtime condition. | |
PluginManagerBase:: |
public | function |
Creates a pre-configured instance of a plugin. Overrides FactoryInterface:: |
12 |
PluginManagerBase:: |
public | function |
Gets a specific plugin definition. Overrides DiscoveryTrait:: |
|
PluginManagerBase:: |
public | function |
Gets the definition of all plugins for this type. Overrides DiscoveryTrait:: |
|
PluginManagerBase:: |
protected | function | Gets the plugin discovery. | 1 |
PluginManagerBase:: |
protected | function | Gets the plugin factory. | 1 |
PluginManagerBase:: |
public | function |
Gets a preconfigured instance of a plugin. Overrides MapperInterface:: |
7 |
PluginManagerBase:: |
protected | function | Allows plugin managers to specify custom behavior if a plugin is not found. | 1 |