function ImageToolkitForm::__construct

Same name in other branches
  1. 9 core/modules/system/src/Form/ImageToolkitForm.php \Drupal\system\Form\ImageToolkitForm::__construct()
  2. 8.9.x core/modules/system/src/Form/ImageToolkitForm.php \Drupal\system\Form\ImageToolkitForm::__construct()
  3. 10 core/modules/system/src/Form/ImageToolkitForm.php \Drupal\system\Form\ImageToolkitForm::__construct()

Constructs an ImageToolkitForm object.

Parameters

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The factory for configuration objects.

\Drupal\Core\Config\TypedConfigManagerInterface $typedConfigManager: The typed config manager.

\Drupal\Core\ImageToolkit\ImageToolkitManager $manager: The image toolkit plugin manager.

Overrides ConfigFormBase::__construct

File

core/modules/system/src/Form/ImageToolkitForm.php, line 36

Class

ImageToolkitForm
Configures image toolkit settings for this site.

Namespace

Drupal\system\Form

Code

public function __construct(ConfigFactoryInterface $config_factory, TypedConfigManagerInterface $typedConfigManager, ImageToolkitManager $manager) {
    parent::__construct($config_factory, $typedConfigManager);
    foreach ($manager->getAvailableToolkits() as $id => $definition) {
        $this->availableToolkits[$id] = $manager->createInstance($id);
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.