class SessionLimitBypassEvent in Session Limit 8
Same name and namespace in other branches
- 2.x src/Event/SessionLimitBypassEvent.php \Drupal\session_limit\Event\SessionLimitBypassEvent
Hierarchy
- class \Drupal\session_limit\Event\SessionLimitBypassEvent extends \Symfony\Component\EventDispatcher\Event
Expanded class hierarchy of SessionLimitBypassEvent
1 file declares its use of SessionLimitBypassEvent
- SessionLimit.php in src/
Services/ SessionLimit.php
File
- src/
Event/ SessionLimitBypassEvent.php, line 7
Namespace
Drupal\session_limit\EventView source
class SessionLimitBypassEvent extends Event {
/**
* @var bool
*/
protected $bypass = FALSE;
/**
* Tell the session limit module you want to bypass session limit check.
*
* usage:
* SessionLimitBypassEvent->bypass(TRUE);
*
* @param bool $bypass
* Set to TRUE to bypass. Otherwise don't call this function
* if at least one listener for this event calls this function
* with a TRUE argument then session limit check is bypassed.
*/
public function setBypass($bypass) {
$this->bypass = !empty($bypass) ? TRUE : $this->bypass;
}
/**
* @return bool
* True if the session limit check should be bypassed.
*/
public function shouldBypass() {
return $this->bypass;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SessionLimitBypassEvent:: |
protected | property | ||
SessionLimitBypassEvent:: |
public | function | Tell the session limit module you want to bypass session limit check. | |
SessionLimitBypassEvent:: |
public | function |