You are here

public function PardotSettingsForm::__construct in Pardot Integration 8

PardotSettingsForm constructor.

Parameters

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

\Drupal\Component\Plugin\Factory\FactoryInterface $plugin_factory: The condition plugin factory.

Overrides ConfigFormBase::__construct

File

src/Form/PardotSettingsForm.php, line 41

Class

PardotSettingsForm
Configure Pardot settings for this site.

Namespace

Drupal\Pardot\Form

Code

public function __construct(ConfigFactoryInterface $config_factory, ExecutableManagerInterface $plugin_factory) {
  parent::__construct($config_factory);

  // Load from pardot.settings.yml.
  $this->settings = $this
    ->config('pardot.settings');

  // Create condition plugins.
  $this->path_condition = $plugin_factory
    ->createInstance('request_path');
  $this->user_role_condition = $plugin_factory
    ->createInstance('user_role');
}