Update to Drupal 8.2.6. For more information, see https://www.drupal.org/project/drupal/releases/8.2.6

This commit is contained in:
Pantheon Automation 2017-02-02 16:28:38 -08:00 committed by Greg Anderson
parent db56c09587
commit f1e72395cb
588 changed files with 26857 additions and 2777 deletions

View file

@ -1,5 +1,9 @@
# Schema for the views default arguments.
views.argument_default.*:
type: mapping
label: 'Base default argument'
views.argument_default.fixed:
type: mapping
label: 'Fixed'
@ -18,3 +22,17 @@ views.argument_default.raw:
use_alias:
type: boolean
label: 'Use path alias'
views.argument_default.query_parameter:
type: mapping
label: 'Query parameter'
mapping:
query_param:
type: string
label: 'Parameter'
fallback:
type: string
label: 'Fallback value'
multiple:
type: string
label: 'Multiple values'

View file

@ -10,7 +10,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Provides block plugin definitions for all Views block displays.
*
* @see \Drupal\views\Plugin\block\block\ViewsBlock
* @see \Drupal\views\Plugin\Block\ViewsBlock
*/
class ViewsBlock implements ContainerDeriverInterface {

View file

@ -9,7 +9,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Provides block plugin definitions for all Views exposed filters.
*
* @see \Drupal\views\Plugin\block\block\ViewsExposedFilterBlock
* @see \Drupal\views\Plugin\Block\ViewsExposedFilterBlock
*/
class ViewsExposedFilterBlock implements ContainerDeriverInterface {

View file

@ -23,7 +23,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
* admin = @Translation("Block")
* )
*
* @see \Drupal\views\Plugin\block\block\ViewsBlock
* @see \Drupal\views\Plugin\Block\ViewsBlock
* @see \Drupal\views\Plugin\Derivative\ViewsBlock
*/
class Block extends DisplayPluginBase {

View file

@ -2,10 +2,12 @@
namespace Drupal\views\Tests\Plugin;
use Drupal\Core\Url;
use Drupal\node\Entity\Node;
use Drupal\node\Entity\NodeType;
use Drupal\views\Views;
use Drupal\views_test_data\Plugin\views\argument_default\ArgumentDefaultTest as ArgumentDefaultTestPlugin;
use Symfony\Component\HttpFoundation\Request;
/**
@ -25,6 +27,7 @@ class ArgumentDefaultTest extends PluginTestBase {
'test_argument_default_fixed',
'test_argument_default_current_user',
'test_argument_default_node',
'test_argument_default_query_param',
);
/**
@ -163,4 +166,24 @@ class ArgumentDefaultTest extends PluginTestBase {
$this->assertTrue(strpos($this->xpath($xpath)[0]->asXml(), $node2->getTitle()));
}
/**
* Tests the query parameter default argument.
*/
public function testArgumentDefaultQueryParameter() {
$view = Views::getView('test_argument_default_query_param');
$request = Request::create(Url::fromUri('internal:/whatever', ['absolute' => TRUE])->toString());
// Check the query parameter default argument fallback value.
$view->setRequest($request);
$view->initHandlers();
$this->assertEqual($view->argument['type']->getDefaultArgument(), 'all');
// Check the query parameter default argument with a value.
$request->query->add(['the_node_type' => 'page']);
$view->setRequest($request);
$view->initHandlers();
$this->assertEqual($view->argument['type']->getDefaultArgument(), 'page');
}
}

View file

@ -0,0 +1,62 @@
langcode: en
status: true
dependencies:
module:
- node
id: test_argument_default_query_param
label: ''
module: views
description: ''
tag: ''
base_table: node_field_data
base_field: nid
core: '8'
display:
default:
display_options:
arguments:
type:
id: type
table: node_field_data
field: type
default_action: default
default_argument_type: query_parameter
default_argument_options:
query_param: the_node_type
fallback: all
multiple: and
entity_type: node
entity_field: type
plugin_id: node_type
fields:
title:
alter:
alter_text: false
ellipsis: true
html: false
make_link: false
strip_tags: false
trim: false
word_boundary: true
empty_zero: false
field: title
hide_empty: false
id: title
table: node_field_data
plugin_id: field
entity_type: node
entity_field: title
pager:
options:
id: 0
items_per_page: 10
offset: 0
type: full
style:
type: default
row:
type: fields
display_plugin: default
display_title: Master
id: default
position: 0

View file

@ -405,6 +405,13 @@ function views_update_8200() {
// Empty update to cause a cache rebuild so that the container is rebuilt.
}
/**
* Rebuild cache to refresh the views config schema.
*/
function views_update_8201() {
// Empty update to cause a cache rebuild so that config schema get refreshed.
}
/**
* @} End of "addtogroup updates-8.2.0".
*/

View file

@ -353,7 +353,7 @@ function views_theme_suggestions_container_alter(array &$suggestions, array $var
* should be shown.
* - #view_display_plugin_id: The plugin ID of the display.
*
* @see \Drupal\views\Plugin\block\block\ViewsBlock::addContextualLinks()
* @see \Drupal\views\Plugin\Block\ViewsBlock::addContextualLinks()
* @see views_preprocess_page()
* @see template_preprocess_views_view()
*/