You are here

public function ReadonlymodeManager::__construct in Read only mode 2.0.x

ReadonlymodeManager constructor.

Parameters

\Drupal\Core\State\StateInterface $state: The drupal state.

\Drupal\Core\Utility\Token $token: The token replacement service.

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

\Drupal\Core\Messenger\MessengerInterface $messenger: The messenger service.

\Drupal\Core\Session\AccountInterface $account: The current user.

File

src/ReadonlymodeManager.php, line 75

Class

ReadonlymodeManager
The manager class for the read only mode.

Namespace

Drupal\readonlymode

Code

public function __construct(StateInterface $state, Token $token, ConfigFactoryInterface $configFactory, MessengerInterface $messenger, AccountInterface $account) {
  $this->state = $state;
  $this->token = $token;
  $this->config = $configFactory
    ->get('readonlymode.settings');
  $this->messenger = $messenger;
  $this->account = $account;
}