function views_hook_info

Same name in other branches
  1. 9 core/modules/views/views.module \views_hook_info()
  2. 10 core/modules/views/views.module \views_hook_info()
  3. 11.x core/modules/views/views.module \views_hook_info()

Implements hook_hook_info().

File

core/modules/views/views.module, line 535

Code

function views_hook_info() {
    $hooks = [];
    $hooks += array_fill_keys([
        'views_data',
        'views_data_alter',
        'views_analyze',
        'views_invalidate_cache',
    ], [
        'group' => 'views',
    ]);
    // Register a views_plugins alter hook for all plugin types.
    foreach (ViewExecutable::getPluginTypes() as $type) {
        $hooks['views_plugins_' . $type . '_alter'] = [
            'group' => 'views',
        ];
    }
    $hooks += array_fill_keys([
        'views_query_substitutions',
        'views_form_substitutions',
        'views_pre_view',
        'views_pre_build',
        'views_post_build',
        'views_pre_execute',
        'views_post_execute',
        'views_pre_render',
        'views_post_render',
        'views_query_alter',
    ], [
        'group' => 'views_execution',
    ]);
    $hooks['field_views_data'] = [
        'group' => 'views',
    ];
    $hooks['field_views_data_alter'] = [
        'group' => 'views',
    ];
    return $hooks;
}

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