diff --git a/core/modules/block/lib/Drupal/block/Controller/BlockAutocompleteController.php b/core/modules/block/lib/Drupal/block/Controller/BlockAutocompleteController.php index 539a8c1..173b051 100644 --- a/core/modules/block/lib/Drupal/block/Controller/BlockAutocompleteController.php +++ b/core/modules/block/lib/Drupal/block/Controller/BlockAutocompleteController.php @@ -75,4 +75,18 @@ public function autocomplete(Request $request) { return new JsonResponse($matches); } + /** + * Sets whether the admin menu is in compact mode or not. + * + * @param string $mode + * Valid values are 'on' and 'off'. + * + * @return \Symfony\Component\HttpFoundation\RedirectResponse + * A redirect response. Redirects back to the front page. + */ + public function compactPage($mode) { + user_cookie_save(array('admin_compact_mode' => ($mode == 'on'))); + return new RedirectResponse(url('', array('absolute' => TRUE))); + } + }