ViewsWizard::$short_title

(optional) The short title used in the views UI. Type: \Drupal\Core\Annotation\Translation Related topics Annotation for translatable text Describes how to put translatable UI text into annotations. File core/modules/views/src/Annotation/ViewsWizard.php, line 40 Class ViewsWizard Defines a Plugin annotation object for views wizard plugins. Namespace Drupal\views\Annotation Code public $short_title = '';

ViewsWizard::$title

The plugin title used in the views UI. Type: \Drupal\Core\Annotation\Translation Related topics Annotation for translatable text Describes how to put translatable UI text into annotations. File core/modules/views/src/Annotation/ViewsWizard.php, line 31 Class ViewsWizard Defines a Plugin annotation object for views wizard plugins. Namespace Drupal\views\Annotation Code public $title = '';

views_add_contextual_links

views_add_contextual_links(&$render_element, $location, $display_id, array $view_element = NULL) Adds contextual links associated with a view display to a renderable array. This function should be called when a view is being rendered in a particular location and you want to attach the appropriate contextual links (e.g., links for editing the view) to it. The function operates by checking the view's display plugin to see if it has defined any contextual links that are intended to be displaye

views_disable_view

views_disable_view(View $view) Disables and saves a view. Parameters \Drupal\views\Entity\View $view: The View object to disable. File core/modules/views/views.module, line 592 Primarily Drupal hooks and global API functions to manipulate views. Code function views_disable_view(View $view) { $view->disable()->save(); }

views_element_validate_tags

views_element_validate_tags($element, FormStateInterface $form_state) Validation callback for query tags. File core/modules/views/views.module, line 798 Primarily Drupal hooks and global API functions to manipulate views. Code function views_element_validate_tags($element, FormStateInterface $form_state) { $values = array_map('trim', explode(',', $element['#value'])); foreach ($values as $value) { if (preg_match("/[^a-z_]/", $value)) { $form_state->setError($element, t('The q

views_embed_view

views_embed_view($name, $display_id = 'default') Embed a view using a PHP snippet. This function is meant to be called from PHP snippets, should one wish to embed a view in a node or something. It's meant to provide the simplest solution and doesn't really offer a lot of options, but breaking the function apart is pretty easy, and this provides a worthwhile guide to doing so. Note that this function does NOT display the title of the view. If you want to do that, you will need to do what this fu

views_enable_view

views_enable_view(View $view) Enables and saves a view. Parameters \Drupal\views\Entity\View $view: The View object to disable. File core/modules/views/views.module, line 582 Primarily Drupal hooks and global API functions to manipulate views. Code function views_enable_view(View $view) { $view->enable()->save(); }

views_entity_field_label

views_entity_field_label($entity_type, $field_name) Returns the label of a certain field. Therefore it looks up in all bundles to find the most used field. File core/modules/views/views.views.inc, line 247 Provide views data that isn't tied to any other module. Code function views_entity_field_label($entity_type, $field_name) { $label_counter = array(); $all_labels = array(); // Count the amount of fields per label per field storage. foreach (array_keys(\Drupal::entityManager()->ge

views_field_config_delete

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

views_field_config_insert

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