views.module

Primarily Drupal hooks and global API functions to manipulate views.

This is the main module file for Views. The main entry points into this module are views_page() and views_block(), where it handles incoming page and block requests.

File

drupal/core/modules/views/views.module
View source

Functions

Namesort descending Description
views_access Determine if the logged in user has access to a view.
views_add_block_contextual_links Converts Views block content to a renderable array with contextual links.
views_add_contextual_links Adds contextual links associated with a view display to a renderable array.
views_arg_load Helper function for menu loading. This will automatically be called in order to 'load' a views argument; primarily it will be used to perform validation.
views_array_key_plus Adds one to each key of the array.
views_block_info Implement hook_block_info().
views_block_view Implement hook_block_view().
views_cache_flush Implements hook_cache_flush().
views_check_perm Access callback for the views_plugin_access_perm access plugin.
views_check_roles Access callback for the views_plugin_access_role access plugin.
views_config_import_create Implements hook_config_import_create().
views_config_import_delete Implements hook_config_import_delete().
views_contextual_links_view_alter Implements hook_contextual_links_view_alter().
views_create_view Creates a view from an array of values.
views_disable_view Disables a view.
views_element_info Implements hook_element_info().
views_element_validate_tags Validation callback for query tags.
views_embed_view Embed a view using a PHP snippet.
views_enable_view Enables a view.
views_exposed_form Form builder for the exposed widgets form.
views_exposed_form_cache Save the Views exposed form for later use.
views_exposed_form_submit Submit handler for exposed filters
views_exposed_form_validate Validate handler for exposed filters
views_fetch_base_tables Fetch a list of all base tables available
views_fetch_data Fetch Views' data from the cache
views_fetch_plugin_names Fetch a list of all base tables available
views_field_create_instance Implements hook_field_create_instance.
views_field_delete_instance Implements hook_field_delete_instance.
views_field_update_instance Implements hook_field_update_instance.
views_form This is the entry function. Just gets the form for the current step. The form is always assumed to be multistep, even if it has only one step (the default 'views_form_views_form' step). That way it is actually possible for modules to have a…
views_forms Implements hook_forms().
views_form_id Returns a form ID for a Views form using the name and display of the View.
views_form_views_exposed_form_alter Implement hook_form_alter for the exposed form.
views_form_views_form Callback for the main step of a Views form. Invoked by views_form().
views_form_views_form_submit Submit handler for the first step of the views form. Calls any existing views_form_submit functions located on the views fields.
views_form_views_form_validate Validate handler for the first step of the views form. Calls any existing views_form_validate functions located on the views fields.
views_get_all_views Returns an array of all views as fully loaded $view objects.
views_get_applicable_views Return a list of all views and display IDs that have a particular setting in their display's plugin settings.
views_get_current_view Find out what, if any, current view is currently in use. Please note that this returns a reference, so be careful! You can unintentionally modify the $view object.
views_get_disabled_views Returns an array of all disabled views, as fully loaded $view objects.
views_get_enabled_display_extenders Get enabled display extenders.
views_get_enabled_views Returns an array of all enabled views, as fully loaded $view objects.
views_get_handler Fetch a handler from the data cache.
views_get_page_view Find out what, if any, page view is currently in use. Please note that this returns a reference, so be careful! You can unintentionally modify the $view object.
views_get_plugin Get an instance of a plugin.
views_get_plugin_definitions Gets all the views plugin definitions.
views_get_view Loads a view from configuration.
views_get_views_as_options Return an array of view as options array, that can be used by select, checkboxes and radios as #options.
views_get_view_result Get the result of a view.
views_handler_field_custom_pre_render_move_text Prerender function to move the textarea to the top.
views_hook_info Implements hook_hook_info().
views_import_access Access callback to determine if the user can import Views.
views_include Include views .inc files as necessary.
views_invalidate_cache Invalidate the views cache, forcing a rebuild on the next grab of table data.
views_language_list Prepares a list of language names.
views_library_info Implements hook_library_info().
views_menu Implement hook_menu().
views_menu_alter Implement hook_menu_alter().
views_new_view Create an empty view to work with.
views_page Page callback: Displays a page view, given a name and display id.
views_page_alter Implements hook_page_alter().
views_permission Implement hook_permission().
views_plugin_list Returns a list of plugins and metadata about them.
views_preprocess_comment A theme preprocess function to automatically allow view-based node templates if called from a view.
views_preprocess_html Implements MODULE_preprocess_HOOK().
views_preprocess_node A theme preprocess function to automatically allow view-based node templates if called from a view.
views_pre_render_view_element View element pre render callback.
views_process_check_options #process callback to see if we need to check_plain() the options.
views_query_views_alter Implements hook_query_TAG_alter().
views_set_current_view Set the current 'current view' that is being built/rendered so that it is easy for other modules or items in drupal_eval to identify
views_set_page_view Set the current 'page view' that is being displayed so that it is easy for other modules or the theme to identify.
views_theme Implement hook_theme(). Register views theming functions.
views_theme_functions Build a list of theme function names for use most everywhere.
views_trim_text Trim the field down to the specified length.
views_views_query_substitutions Substitute current time; this works with cached queries.
views_view_has_form_elements Returns TRUE if the passed-in view contains handlers with views form implementations, FALSE otherwise.
views_view_is_disabled Returns whether the view is disabled.
views_view_is_enabled Returns whether the view is enabled.
_field_view_formatter_options Helper function: Return an array of formatter options for a field type.
_views_array_filter_zero Filter by no empty values, though allow to use "0".
_views_find_module_templates Scans a directory of a module for template files.
_views_query_tag_alter_condition Replaces the substitutions recursive foreach condition.
_views_weight_sort Sorts a structured array by the 'weight' and then by 'title' element.

Constants

Namesort descending Description
VIEWS_API_VERSION Views API version string.