function quickedit_preprocess_page_title

Same name in other branches
  1. 9 core/modules/quickedit/quickedit.module \quickedit_preprocess_page_title()

Implements hook_preprocess_HOOK() for the page title template.

File

core/modules/quickedit/quickedit.module, line 122

Code

function quickedit_preprocess_page_title(&$variables) {
    $variables['#cache']['contexts'][] = 'user.permissions';
    if (\Drupal::currentUser()->hasPermission('access in-place editing')) {
        $variables['title_attributes']['class'][] = 'js-quickedit-page-title';
    }
}

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