PagesRestrictionSessionService.php in Pages Restriction Access 8
File
src/Service/PagesRestrictionSessionService.php
View source
<?php
namespace Drupal\pages_restriction\Service;
use Symfony\Component\HttpFoundation\Session\Session;
class PagesRestrictionSessionService {
private $session;
public function __construct(Session $session) {
$this->session = $session;
}
public function setBypass($path) {
$pages_restriction_bypass = $this->session
->get('pages_restriction_bypass');
$pages_restriction_bypass[] = $path;
$this->session
->set('pages_restriction_bypass', $pages_restriction_bypass);
return $pages_restriction_bypass;
}
}