function toolbar_toggle_page

Menu callback; toggles the visibility of the toolbar drawer.

1 string reference to 'toolbar_toggle_page'
toolbar_menu in modules/toolbar/toolbar.module
Implements hook_menu().

File

modules/toolbar/toolbar.module, line 70

Code

function toolbar_toggle_page() {
    global $base_path;
    // Toggle the value in the cookie.
    drupal_setcookie('Drupal.toolbar.collapsed', !_toolbar_is_collapsed(), array(
        'samesite' => 'Lax',
        'path' => $base_path,
    ));
    // Redirect the user from where he used the toggle element.
    drupal_goto();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.