public function AdsenseManagedSettings::__construct in Google AdSense integration 8
Constructs a \Drupal\adsense\Form\AdsenseManagedSettings object.
Parameters
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The factory for configuration objects.
\Drupal\Component\Plugin\Factory\FactoryInterface $plugin_factory: The factory for condition plugin objects.
Overrides ConfigFormBase::__construct
File
- src/
Form/ AdsenseManagedSettings.php, line 35
Class
- AdsenseManagedSettings
- Form for the adsense managed ads settings.
Namespace
Drupal\adsense\FormCode
public function __construct(ConfigFactoryInterface $config_factory, FactoryInterface $plugin_factory) {
parent::__construct($config_factory);
try {
$this->condition = $plugin_factory
->createInstance('request_path');
} catch (PluginException $e) {
// System is badly broken if we can't get the condition plugin.
$this->condition = NULL;
}
}