views_field_config_update

views_field_config_update(FieldConfigInterface $field) Implements hook_ENTITY_TYPE_update() for 'field_config'. File core/modules/views/views.module, line 447 Primarily Drupal hooks and global API functions to manipulate views. Code function views_field_config_update(FieldConfigInterface $field) { Views::viewsData()->clear(); }

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_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

views_get_current_view

&views_get_current_view() Find out what, if any, current view is currently in use. Note that this returns a reference, so be careful! You can unintentionally modify the $view object. Return value \Drupal\views\ViewExecutable The current view object. File core/modules/views/views.module, line 503 Primarily Drupal hooks and global API functions to manipulate views. Code function &views_get_current_view() { return views_set_current_view(); }

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_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_hook_info

views_hook_info() Implements hook_hook_info(). File core/modules/views/views.module, line 510 Primarily Drupal hooks and global API functions to manipulate views. Code function views_hook_info() { $hooks = array(); $hooks += array_fill_keys(array( 'views_data', 'views_data_alter', 'views_analyze', 'views_invalidate_cache', ), array('group' => 'views')); // Register a views_plugins alter hook for all plugin types. foreach (ViewExecutable::getPluginTypes() as $typ

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_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_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