views_invalidate_cache

views_invalidate_cache() Invalidate the views cache, forcing a rebuild on the next grab of table data. File core/modules/views/views.module, line 461 Primarily Drupal hooks and global API functions to manipulate views. Code function views_invalidate_cache() { // Set the menu as needed to be rebuilt. \Drupal::service('router.builder')->setRebuildNeeded(); $module_handler = \Drupal::moduleHandler(); // Reset the RouteSubscriber from views. \Drupal::getContainer()->get('views.r

views_post_update_cleanup_duplicate_views_data

views_post_update_cleanup_duplicate_views_data() Update some views fields that were previously duplicated. File core/modules/views/views.post_update.php, line 50 Post update functions for Views. Code function views_post_update_cleanup_duplicate_views_data() { $config_factory = \Drupal::configFactory(); $ids = []; $message = NULL; $data_tables = []; $base_tables = []; $revision_tables = []; $entities_by_table = []; $duplicate_fields = []; $handler_types = Views::getHandlerTyp

views_local_tasks_alter

views_local_tasks_alter(&$local_tasks) Implements hook_local_tasks_alter(). File core/modules/views/views.module, line 811 Primarily Drupal hooks and global API functions to manipulate views. Code function views_local_tasks_alter(&$local_tasks) { $container = \Drupal::getContainer(); $local_task = ViewsLocalTask::create($container, 'views_view'); $local_task->alterLocalTasks($local_tasks); }

views_pre_render_views_form_views_form

views_pre_render_views_form_views_form($element) Replaces views substitution placeholders. Parameters array $element: An associative array containing the properties of the element. Properties used: #substitutions, #children. Return value array The $element with prepared variables ready for #theme 'form' in views_form_views_form. File core/modules/views/views.module, line 606 Primarily Drupal hooks and global API functions to manipulate views. Code function views_pre_render_views_form_views_

views_preprocess_node

views_preprocess_node(&$variables) A theme preprocess function to automatically allow view-based node templates if called from a view. The 'modules/node.views.inc' file is a better place for this, but we haven't got a chance to load that file before Drupal builds the node portion of the theme registry. File core/modules/views/views.module, line 232 Primarily Drupal hooks and global API functions to manipulate views. Code function views_preprocess_node(&$variables) { // The 'view' at

views_preprocess_comment

views_preprocess_comment(&$variables) A theme preprocess function to automatically allow view-based node templates if called from a view. File core/modules/views/views.module, line 265 Primarily Drupal hooks and global API functions to manipulate views. Code function views_preprocess_comment(&$variables) { // The view data is added to the comment in // \Drupal\views\Plugin\views\row\EntityRow::preRender(). if (!empty($variables['comment']->view) && $variables['comment

views_get_view_result

views_get_view_result($name, $display_id = NULL) Get the result of a view. Parameters string $name: The name of the view to retrieve the data from. string $display_id: The display id. On the edit page for the view in question, you'll find a list of displays at the left side of the control area. "Master" will be at the top of that list. Hover your cursor over the name of the display you want to use. A URL will appear in the status bar of your browser. This is usually at the bottom of the window

views_field_default_views_data

views_field_default_views_data(FieldStorageConfigInterface $field_storage) Default views data implementation for a field. Parameters \Drupal\field\FieldStorageConfigInterface $field_storage: The field definition. Return value array The default views data for the field. File core/modules/views/views.views.inc, line 287 Provide views data that isn't tied to any other module. Code function views_field_default_views_data(FieldStorageConfigInterface $field_storage) { $data = array(); // Che

views_help

views_help($route_name, RouteMatchInterface $route_match) Implements hook_help(). File core/modules/views/views.module, line 25 Primarily Drupal hooks and global API functions to manipulate views. Code function views_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { case 'help.page.views': $output = ''; $output .= '<h3>' . t('About') . '</h3>'; $output .= '<p>' . t('The Views module provides a back end to fetch information f

views_form_views_exposed_form_alter

views_form_views_exposed_form_alter(&$form, FormStateInterface $form_state) Implements hook_form_alter() for the exposed form. Since the exposed form is a GET form, we don't want it to send a wide variety of information. File core/modules/views/views.module, line 643 Primarily Drupal hooks and global API functions to manipulate views. Code function views_form_views_exposed_form_alter(&$form, FormStateInterface $form_state) { $form['form_build_id']['#access'] = FALSE; $form['form_t