diff --git a/core/modules/views/lib/Drupal/views/Plugin/Type/DefaultWizardDeriver.php b/core/modules/views/lib/Drupal/views/Plugin/Type/DefaultWizardDeriver.php index 4af19bb..49274bf 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/Type/DefaultWizardDeriver.php +++ b/core/modules/views/lib/Drupal/views/Plugin/Type/DefaultWizardDeriver.php @@ -37,8 +37,9 @@ public function getDerivativeDefinition($derivative_id, array $base_plugin_defin public function getDerivativeDefinitions(array $base_plugin_definition) { $base_tables = array_keys(views_fetch_base_tables()); $this->derivatives = array(); + $views_data = drupal_container()->get('views.views_data'); foreach ($base_tables as $table) { - $views_info = drupal_container()->get('views.views_data')->get($table); + $views_info = $views_data->get($table); if (empty($views_info['table']['wizard_id'])) { $this->derivatives[$table] = array( 'id' => 'standard', diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php index 27b51c2..50a61b9 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php @@ -127,7 +127,6 @@ public function init(ViewExecutable $view, &$display, $options = NULL) { unset($options['defaults']); } - views_include('cache'); // Cache for unpackOptions, but not if we are in the ui. static $unpack_options = array(); if (empty($view->editing)) { diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/query/Sql.php b/core/modules/views/lib/Drupal/views/Plugin/views/query/Sql.php index db664a5..25c938b 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/query/Sql.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/query/Sql.php @@ -1540,7 +1540,8 @@ function execute(ViewExecutable $view) { function get_entity_tables() { // Start with the base table. $entity_tables = array(); - $base_table_data = drupal_container()->get('views.views_data')->get($this->view->storage->get('base_table')); + $views_data = drupal_container()->get('views.views_data'); + $base_table_data = $views_data->get($this->view->storage->get('base_table')); if (isset($base_table_data['table']['entity type'])) { $entity_tables[$this->view->storage->get('base_table')] = array( 'base' => $this->view->storage->get('base_table'), @@ -1551,7 +1552,7 @@ function get_entity_tables() { } // Include all relationships. foreach ($this->view->relationship as $relationship_id => $relationship) { - $table_data = drupal_container()->get('views.views_data')->get($relationship->definition['base']); + $table_data = $views_data->get($relationship->definition['base']); if (isset($table_data['table']['entity type'])) { $entity_tables[$relationship->alias] = array( 'base' => $relationship->definition['base'], diff --git a/core/modules/views/lib/Drupal/views/ViewsDataCache.php b/core/modules/views/lib/Drupal/views/ViewsDataCache.php index 684e1f2..734f8d6 100644 --- a/core/modules/views/lib/Drupal/views/ViewsDataCache.php +++ b/core/modules/views/lib/Drupal/views/ViewsDataCache.php @@ -23,7 +23,7 @@ class ViewsDataCache { protected $baseCid = 'views_data'; /** - * This views cache bin to use. + * The views cache bin to use. * * @var string */ @@ -82,8 +82,8 @@ public function __construct(CacheBackendInterface $bin, ConfigFactory $config) { /** * Gets cached data for a particular key, or rebuilds if necessary. * - * @param string $key - * The key of the cache entry to retrieve. + * @param string|null $key + * The key of the cache entry to retrieve. Defaults to NULL. * * @return array $data * The cached data. @@ -162,7 +162,7 @@ protected function cacheGet($cid) { } /** - * Gets all data invoked by hook_views_data. + * Gets all data invoked by hook_views_data(). * * @return array * An array of all data. diff --git a/core/modules/views/views.module b/core/modules/views/views.module index 00fccb4..1783f16 100644 --- a/core/modules/views/views.module +++ b/core/modules/views/views.module @@ -614,7 +614,6 @@ function views_contextual_links_view_alter(&$element, $items) { */ function views_block_info() { // Try to avoid instantiating all the views just to get the blocks info. - views_include('cache'); $cache = views_cache_get('views_block_items', TRUE); if ($cache && is_array($cache->data)) { return $cache->data;