public function SecurityReview::__construct in Security Review 8
Constructs a SecurityReview instance.
Parameters
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.
\Drupal\Core\State\StateInterface $state: The state storage.
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.
\Drupal\Core\Session\AccountProxyInterface $current_user: The current user.
File
- src/
SecurityReview.php, line 73
Class
- SecurityReview
- A class containing static methods regarding the module's configuration.
Namespace
Drupal\security_reviewCode
public function __construct(ConfigFactoryInterface $config_factory, StateInterface $state, ModuleHandlerInterface $module_handler, AccountProxyInterface $current_user) {
// Store the dependencies.
$this->configFactory = $config_factory;
$this->config = $config_factory
->getEditable('security_review.settings');
$this->state = $state;
$this->moduleHandler = $module_handler;
$this->currentUser = $current_user;
}