class PagesRestrictionSessionService in Pages Restriction Access 8
Pages Restriction Session Service.
Hierarchy
- class \Drupal\pages_restriction\Service\PagesRestrictionSessionService
Expanded class hierarchy of PagesRestrictionSessionService
1 string reference to 'PagesRestrictionSessionService'
1 service uses PagesRestrictionSessionService
File
- src/
Service/ PagesRestrictionSessionService.php, line 10
Namespace
Drupal\pages_restriction\ServiceView source
class PagesRestrictionSessionService {
/**
* Symfony session handler.
*
* @var \Symfony\Component\HttpFoundation\Session\Session
*/
private $session;
/**
* {@inheritdoc}
*/
public function __construct(Session $session) {
$this->session = $session;
}
/**
* Set Bypass.
*/
public function setBypass($path) {
// Get current bypass values.
$pages_restriction_bypass = $this->session
->get('pages_restriction_bypass');
// Set next URL on bypass session.
$pages_restriction_bypass[] = $path;
// Update Bypass Session.
$this->session
->set('pages_restriction_bypass', $pages_restriction_bypass);
// Return Bypass Session.
return $pages_restriction_bypass;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PagesRestrictionSessionService:: |
private | property | Symfony session handler. | |
PagesRestrictionSessionService:: |
public | function | Set Bypass. | |
PagesRestrictionSessionService:: |
public | function |