SystemController::compactPage

public SystemController::compactPage($mode)

Sets whether the admin menu is in compact mode or not.

Parameters

string $mode: Valid values are 'on' and 'off'.

Return value

\Symfony\Component\HttpFoundation\RedirectResponse

File

core/modules/system/src/Controller/SystemController.php, line 175

Class

SystemController
Returns responses for System routes.

Namespace

Drupal\system\Controller

Code

public function compactPage($mode) {
  user_cookie_save(array('admin_compact_mode' => ($mode == 'on')));
  return $this->redirect('<front>');
}
doc_Drupal
2016-10-29 09:45:44
Comments
Leave a Comment

Please login to continue.