public function ContentLock::__construct in Content locking (anti-concurrent editing) 8
Same name and namespace in other branches
- 8.2 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\AccountProxy $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.
File
- src/ContentLock/ ContentLock.php, line 127 
Class
- ContentLock
- Class ContentLock.
Namespace
Drupal\content_lock\ContentLockCode
public function __construct(Connection $database, ModuleHandler $moduleHandler, DateFormatter $dateFormatter, AccountProxy $currentUser, ConfigFactory $configFactory, RequestStack $requestStack, EntityTypeManagerInterface $entityTypeManager, MessengerInterface $messenger) {
  $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;
}