You are here

public function ProtectionRuleFormBase::__construct in User protect 8

Constructs a base class for protection rule add and edit forms.

Parameters

\Drupal\Core\Entity\EntityStorageInterface $protection_rule_storage: The protection rule entity storage controller.

\Drupal\user\UserStorageInterface $user_storage: The user storage.

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

File

src/Form/ProtectionRuleFormBase.php, line 48

Class

ProtectionRuleFormBase
Provides a base form controller for a protection rule.

Namespace

Drupal\userprotect\Form

Code

public function __construct(EntityStorageInterface $protection_rule_storage, UserStorageInterface $user_storage, MessengerInterface $messenger) {
  $this->protectionRuleStorage = $protection_rule_storage;
  $this->userStorage = $user_storage;
  $this->messenger = $messenger;
}