You are here

public function ContentLock::__construct in Content locking (anti-concurrent editing) 8.2

Same name and namespace in other branches
  1. 8 src/ContentLock/ContentLock.php \Drupal\content_lock\ContentLock\ContentLock::__construct()

Constructor.

Parameters

\Drupal\Core\Database\Connection $database: The database connection.

\Drupal\Core\Extension\ModuleHandler $moduleHandler: The module Handler service.

\Drupal\Core\Datetime\DateFormatter $dateFormatter: The date.formatter service.

\Drupal\Core\Session\AccountProxyInterface $currentUser: The current_user service.

\Drupal\Core\Config\ConfigFactory $configFactory: The config.factory service.

\Symfony\Component\HttpFoundation\RequestStack $requestStack: The request stack service.

\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: The entity_type.manager service.

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

\Drupal\Component\Datetime\TimeInterface $time: The time service.

File

src/ContentLock/ContentLock.php, line 130

Class

ContentLock
Class ContentLock.

Namespace

Drupal\content_lock\ContentLock

Code

public function __construct(Connection $database, ModuleHandler $moduleHandler, DateFormatter $dateFormatter, AccountProxyInterface $currentUser, ConfigFactory $configFactory, RequestStack $requestStack, EntityTypeManagerInterface $entityTypeManager, MessengerInterface $messenger, TimeInterface $time) {
  $this->database = $database;
  $this->moduleHandler = $moduleHandler;
  $this->dateFormatter = $dateFormatter;
  $this->currentUser = $currentUser;
  $this->config = $configFactory
    ->get('content_lock.settings');
  $this->currentRequest = $requestStack
    ->getCurrentRequest();
  $this->entityTypeManager = $entityTypeManager;
  $this->messenger = $messenger;
  $this->time = $time;
}