CommentThemeHooks.php

Namespace

Drupal\comment\Hook

File

core/modules/comment/src/Hook/CommentThemeHooks.php

View source
<?php

namespace Drupal\comment\Hook;

use Drupal\Core\Hook\Attribute\Preprocess;

/**
 * Hook implementations for comment.
 */
class CommentThemeHooks {
    
    /**
     * Implements hook_preprocess_HOOK() for block templates.
     */
    public function preprocessBlock(&$variables) : void {
        if ($variables['configuration']['provider'] == 'comment') {
            $variables['attributes']['role'] = 'navigation';
        }
    }

}

Classes

Title Deprecated Summary
CommentThemeHooks Hook implementations for comment.

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