You are here

public function SessionLimitDisconnectEvent::preventDisconnect in Session Limit 8

Same name and namespace in other branches
  1. 2.x src/Event/SessionLimitDisconnectEvent.php \Drupal\session_limit\Event\SessionLimitDisconnectEvent::preventDisconnect()

Call to prevent the session being disconnected.

Parameters

bool $state: Set to TRUE to prevent the disconnection (default) any other value is ignored. Just one listener to the event calling this will prevent the disconnection.

File

src/Event/SessionLimitDisconnectEvent.php, line 65

Class

SessionLimitDisconnectEvent

Namespace

Drupal\session_limit\Event

Code

public function preventDisconnect($state = TRUE) {
  $this->preventDisconnect = !empty($state) ? TRUE : $this->preventDisconnect;
}