function quickedit_preprocess_page_title in Drupal 9
Same name and namespace in other branches
- 8 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 123 - Provides in-place content editing functionality for fields.
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';
}
}