function hook_views_api

cis7 views.api.php hook_views_api()
cle7 views.api.php hook_views_api()
elmsmedia7 views.api.php hook_views_api()
icor7 views.api.php hook_views_api()
meedjum_blog7 views.api.php hook_views_api()
mooc7 views.api.php hook_views_api()

Register View API information.

This is required for your module to have its include files loaded; for example, when implementing hook_views_default_views().

Return value

An array with the following possible keys:

  • api: (required) The version of the Views API the module implements.
  • path: (optional) If includes are stored somewhere other than within the root module directory, specify its path here.
  • template path: (optional) A path where the module has stored it's views template files. When you have specificed this key views automatically uses the template files for the views. You can use the same naming conventions like for normal views template files.

Related topics

60 functions implement hook_views_api()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

accessibility_reporting_views_api in sites/all/modules/ulmus/accessibility/modules/accessibility_reporting/accessibility_reporting.module
Implements hook_views_api().
accessibility_views_api in sites/all/modules/ulmus/accessibility/accessibility.module
Implements hook_views_api().
bef_test_content_views_api in sites/all/modules/ulmus/better_exposed_filters/tests/bef_test_content/bef_test_content.features.inc
Implements hook_views_api().
better_exposed_filters_views_api in sites/all/modules/ulmus/better_exposed_filters/better_exposed_filters.module
Implements hook_views_api().
cis_connector_views_api in sites/all/modules/elmsln_contrib/cis_connector/cis_connector.module
Implements hook_views_api().

... See full list

File

sites/all/modules/ulmus/views/views.api.php, line 656
Describe hooks provided by the Views module.

Code

function hook_views_api() {
  return array(
    'api' => 3,
    'path' => drupal_get_path('module', 'example') . '/includes/views',
    'template path' => drupal_get_path('module', 'example') . '/themes',
  );
}