function DblogHooks::viewsPreRender

Implements hook_views_pre_render().

File

core/modules/dblog/src/Hook/DblogHooks.php, line 102

Class

DblogHooks
Hook implementations for dblog.

Namespace

Drupal\dblog\Hook

Code

public function viewsPreRender(ViewExecutable $view) {
    if (isset($view) && $view->storage
        ->get('base_table') == 'watchdog') {
        $view->element['#attached']['library'][] = 'dblog/drupal.dblog';
    }
}

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