You are here

protected function AjaxPageControllerBase::loadState in Forena Reports 8

Loads the state from the token.

1 call to AjaxPageControllerBase::loadState()
AjaxPageControllerBase::__construct in src/Controller/AjaxPageControllerBase.php
AjaxPageControllerBase constructor.

File

src/Controller/AjaxPageControllerBase.php, line 216

Class

AjaxPageControllerBase

Namespace

Drupal\forena\Controller

Code

protected function loadState() {
  if (!$this->token) {
    $this
      ->generateStateToken();
  }
  else {
    $svc = \Drupal::keyValueExpirable(static::TOKEN_PREFIX);
    $data = $svc
      ->get($this->token);
    if ($data) {
      $this->state = unserialize($data);
    }
  }
}