function FormBase::setConfigFactory

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Form/FormBase.php \Drupal\Core\Form\FormBase::setConfigFactory()
  2. 10 core/lib/Drupal/Core/Form/FormBase.php \Drupal\Core\Form\FormBase::setConfigFactory()
  3. 11.x core/lib/Drupal/Core/Form/FormBase.php \Drupal\Core\Form\FormBase::setConfigFactory()

Sets the config factory for this form.

Parameters

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.

Return value

$this

1 call to FormBase::setConfigFactory()
ConfigFormBase::__construct in core/lib/Drupal/Core/Form/ConfigFormBase.php
Constructs a \Drupal\system\ConfigFormBase object.

File

core/lib/Drupal/Core/Form/FormBase.php, line 135

Class

FormBase
Provides a base class for forms.

Namespace

Drupal\Core\Form

Code

public function setConfigFactory(ConfigFactoryInterface $config_factory) {
    $this->configFactory = $config_factory;
    return $this;
}

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