function quickedit_preprocess_page_title

Same name in other branches
  1. 8.9.x 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 141

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.