You are here

class MutableQualityToolkitManager in Image Style Quality 8

Manage setting quality values on different toolkits.

Hierarchy

Expanded class hierarchy of MutableQualityToolkitManager

1 string reference to 'MutableQualityToolkitManager'
image_style_quality.services.yml in ./image_style_quality.services.yml
image_style_quality.services.yml
1 service uses MutableQualityToolkitManager
image_style_quality.mutable_quality_toolkit_manager in ./image_style_quality.services.yml
Drupal\image_style_quality\MutableQualityToolkitManager

File

src/MutableQualityToolkitManager.php, line 13

Namespace

Drupal\image_style_quality
View 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

Namesort descending Modifiers Type Description Overrides
DiscoveryTrait::doGetDefinition protected function Gets a specific plugin definition.
DiscoveryTrait::hasDefinition public function
MutableQualityToolkitManager::$configFactory protected property Config factory.
MutableQualityToolkitManager::getActiveToolkit public function Get the toolkit definition that is currently active on the site. Overrides MutableQualityToolkitManagerInterface::getActiveToolkit
MutableQualityToolkitManager::__construct public function Constructs a new MutableQualityToolkitManager instance.
PluginManagerBase::$discovery protected property The object that discovers plugins managed by this manager.
PluginManagerBase::$factory protected property The object that instantiates plugins managed by this manager.
PluginManagerBase::$mapper protected property The object that returns the preconfigured plugin instance appropriate for a particular runtime condition.
PluginManagerBase::createInstance public function Creates a pre-configured instance of a plugin. Overrides FactoryInterface::createInstance 12
PluginManagerBase::getDefinition public function Gets a specific plugin definition. Overrides DiscoveryTrait::getDefinition
PluginManagerBase::getDefinitions public function Gets the definition of all plugins for this type. Overrides DiscoveryTrait::getDefinitions
PluginManagerBase::getDiscovery protected function Gets the plugin discovery. 1
PluginManagerBase::getFactory protected function Gets the plugin factory. 1
PluginManagerBase::getInstance public function Gets a preconfigured instance of a plugin. Overrides MapperInterface::getInstance 7
PluginManagerBase::handlePluginNotFound protected function Allows plugin managers to specify custom behavior if a plugin is not found. 1