public function DevelController::session in Devel 8
Same name and namespace in other branches
- 8.3 src/Controller/DevelController.php \Drupal\devel\Controller\DevelController::session()
- 8.2 src/Controller/DevelController.php \Drupal\devel\Controller\DevelController::session()
- 4.x src/Controller/DevelController.php \Drupal\devel\Controller\DevelController::session()
Builds the session overview page.
Return value
array Array of page elements to render.
1 string reference to 'DevelController::session'
File
- src/
Controller/ DevelController.php, line 174
Class
- DevelController
- Returns responses for devel module routes.
Namespace
Drupal\devel\ControllerCode
public function session() {
$output['description'] = array(
'#markup' => '<p>' . $this
->t('Here are the contents of your $_SESSION variable.') . '</p>',
);
$output['session'] = array(
'#type' => 'table',
'#header' => array(
$this
->t('Session name'),
$this
->t('Session ID'),
),
'#rows' => array(
array(
session_name(),
session_id(),
),
),
'#empty' => $this
->t('No session available.'),
);
$output['data'] = $this->dumper
->exportAsRenderable($_SESSION);
return $output;
}