Update to Drupal 8.2.0. For more information, see https://www.drupal.org/project/drupal/releases/8.2.0
This commit is contained in:
parent
2f563ab520
commit
f1c8716f57
1732 changed files with 52334 additions and 11780 deletions
|
@ -5,8 +5,8 @@
|
|||
* Text fixture.
|
||||
*/
|
||||
|
||||
use Drupal\Component\Serialization\Yaml;
|
||||
use Drupal\Core\Database\Database;
|
||||
use Drupal\Core\Serialization\Yaml;
|
||||
|
||||
$connection = Database::getConnection();
|
||||
|
||||
|
|
19
core/modules/views/tests/fixtures/update/boolean-filter-values.php
vendored
Normal file
19
core/modules/views/tests/fixtures/update/boolean-filter-values.php
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Test fixture.
|
||||
*/
|
||||
|
||||
use Drupal\Core\Database\Database;
|
||||
use Drupal\Core\Serialization\Yaml;
|
||||
|
||||
$connection = Database::getConnection();
|
||||
|
||||
$connection->insert('config')
|
||||
->fields(array(
|
||||
'collection' => '',
|
||||
'name' => 'views.view.test_boolean_filter_values',
|
||||
'data' => serialize(Yaml::decode(file_get_contents('core/modules/views/tests/fixtures/update/views.view.test_boolean_filter_values.yml'))),
|
||||
))
|
||||
->execute();
|
|
@ -5,8 +5,8 @@
|
|||
* Test fixture.
|
||||
*/
|
||||
|
||||
use Drupal\Component\Serialization\Yaml;
|
||||
use Drupal\Core\Database\Database;
|
||||
use Drupal\Core\Serialization\Yaml;
|
||||
|
||||
$connection = Database::getConnection();
|
||||
|
||||
|
|
604
core/modules/views/tests/fixtures/update/views.view.test_boolean_filter_values.yml
vendored
Normal file
604
core/modules/views/tests/fixtures/update/views.view.test_boolean_filter_values.yml
vendored
Normal file
|
@ -0,0 +1,604 @@
|
|||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
module:
|
||||
- node
|
||||
- user
|
||||
id: test_boolean_filter_values
|
||||
label: Content
|
||||
module: node
|
||||
description: 'Find and manage content.'
|
||||
tag: default
|
||||
base_table: node_field_data
|
||||
base_field: nid
|
||||
core: 8.x
|
||||
display:
|
||||
default:
|
||||
display_options:
|
||||
access:
|
||||
type: perm
|
||||
options:
|
||||
perm: 'access content overview'
|
||||
cache:
|
||||
type: tag
|
||||
query:
|
||||
type: views_query
|
||||
exposed_form:
|
||||
type: basic
|
||||
options:
|
||||
submit_button: Filter
|
||||
reset_button: true
|
||||
reset_button_label: Reset
|
||||
exposed_sorts_label: 'Sort by'
|
||||
expose_sort_order: true
|
||||
sort_asc_label: Asc
|
||||
sort_desc_label: Desc
|
||||
pager:
|
||||
type: full
|
||||
options:
|
||||
items_per_page: 50
|
||||
tags:
|
||||
previous: '‹ Previous'
|
||||
next: 'Next ›'
|
||||
first: '« First'
|
||||
last: 'Last »'
|
||||
style:
|
||||
type: table
|
||||
options:
|
||||
grouping: { }
|
||||
row_class: ''
|
||||
default_row_class: true
|
||||
override: true
|
||||
sticky: true
|
||||
caption: ''
|
||||
summary: ''
|
||||
description: ''
|
||||
columns:
|
||||
node_bulk_form: node_bulk_form
|
||||
title: title
|
||||
type: type
|
||||
name: name
|
||||
status: status
|
||||
changed: changed
|
||||
edit_node: edit_node
|
||||
delete_node: delete_node
|
||||
dropbutton: dropbutton
|
||||
timestamp: title
|
||||
info:
|
||||
node_bulk_form:
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
responsive: ''
|
||||
title:
|
||||
sortable: true
|
||||
default_sort_order: asc
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
responsive: ''
|
||||
type:
|
||||
sortable: true
|
||||
default_sort_order: asc
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
responsive: ''
|
||||
name:
|
||||
sortable: false
|
||||
default_sort_order: asc
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
responsive: priority-low
|
||||
status:
|
||||
sortable: true
|
||||
default_sort_order: asc
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
responsive: ''
|
||||
changed:
|
||||
sortable: true
|
||||
default_sort_order: desc
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
responsive: priority-low
|
||||
edit_node:
|
||||
sortable: false
|
||||
default_sort_order: asc
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
responsive: ''
|
||||
delete_node:
|
||||
sortable: false
|
||||
default_sort_order: asc
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
responsive: ''
|
||||
dropbutton:
|
||||
sortable: false
|
||||
default_sort_order: asc
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
responsive: ''
|
||||
timestamp:
|
||||
sortable: false
|
||||
default_sort_order: asc
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
responsive: ''
|
||||
default: changed
|
||||
empty_table: true
|
||||
row:
|
||||
type: fields
|
||||
fields:
|
||||
node_bulk_form:
|
||||
id: node_bulk_form
|
||||
table: node
|
||||
field: node_bulk_form
|
||||
label: ''
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
element_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
plugin_id: node_bulk_form
|
||||
entity_type: node
|
||||
title:
|
||||
id: title
|
||||
table: node_field_data
|
||||
field: title
|
||||
label: Title
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
element_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
entity_type: node
|
||||
entity_field: title
|
||||
type: string
|
||||
settings:
|
||||
link_to_entity: true
|
||||
plugin_id: field
|
||||
type:
|
||||
id: type
|
||||
table: node_field_data
|
||||
field: type
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
label: 'Content type'
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
text: ''
|
||||
make_link: false
|
||||
path: ''
|
||||
absolute: false
|
||||
external: false
|
||||
replace_spaces: false
|
||||
path_case: none
|
||||
trim_whitespace: false
|
||||
alt: ''
|
||||
rel: ''
|
||||
link_class: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
target: ''
|
||||
nl2br: false
|
||||
max_length: 0
|
||||
word_boundary: true
|
||||
ellipsis: true
|
||||
more_link: false
|
||||
more_link_text: ''
|
||||
more_link_path: ''
|
||||
strip_tags: false
|
||||
trim: false
|
||||
preserve_tags: ''
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: true
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
click_sort_column: target_id
|
||||
type: entity_reference_label
|
||||
settings:
|
||||
link: false
|
||||
group_column: target_id
|
||||
group_columns: { }
|
||||
group_rows: true
|
||||
delta_limit: 0
|
||||
delta_offset: 0
|
||||
delta_reversed: false
|
||||
delta_first_last: false
|
||||
multi_type: separator
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
entity_type: node
|
||||
entity_field: type
|
||||
plugin_id: field
|
||||
name:
|
||||
id: name
|
||||
table: users_field_data
|
||||
field: name
|
||||
relationship: uid
|
||||
label: Author
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
element_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
plugin_id: field
|
||||
type: user_name
|
||||
entity_type: user
|
||||
entity_field: name
|
||||
status:
|
||||
id: status
|
||||
table: node_field_data
|
||||
field: status
|
||||
label: Status
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
element_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
type: boolean
|
||||
settings:
|
||||
format: custom
|
||||
format_custom_true: Published
|
||||
format_custom_false: Unpublished
|
||||
plugin_id: field
|
||||
entity_type: node
|
||||
entity_field: status
|
||||
changed:
|
||||
id: changed
|
||||
table: node_field_data
|
||||
field: changed
|
||||
label: Updated
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
element_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
type: timestamp
|
||||
settings:
|
||||
date_format: short
|
||||
custom_date_format: ''
|
||||
timezone: ''
|
||||
plugin_id: field
|
||||
entity_type: node
|
||||
entity_field: changed
|
||||
operations:
|
||||
id: operations
|
||||
table: node
|
||||
field: operations
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
label: Operations
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
text: ''
|
||||
make_link: false
|
||||
path: ''
|
||||
absolute: false
|
||||
external: false
|
||||
replace_spaces: false
|
||||
path_case: none
|
||||
trim_whitespace: false
|
||||
alt: ''
|
||||
rel: ''
|
||||
link_class: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
target: ''
|
||||
nl2br: false
|
||||
max_length: 0
|
||||
word_boundary: true
|
||||
ellipsis: true
|
||||
more_link: false
|
||||
more_link_text: ''
|
||||
more_link_path: ''
|
||||
strip_tags: false
|
||||
trim: false
|
||||
preserve_tags: ''
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: true
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
destination: true
|
||||
plugin_id: entity_operations
|
||||
filters:
|
||||
status_extra:
|
||||
id: status_extra
|
||||
table: node_field_data
|
||||
field: status_extra
|
||||
operator: '='
|
||||
value: false
|
||||
plugin_id: node_status
|
||||
group: 1
|
||||
entity_type: node
|
||||
status:
|
||||
id: status
|
||||
table: node_field_data
|
||||
field: status
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
operator: '='
|
||||
value: true
|
||||
group: 1
|
||||
exposed: true
|
||||
expose:
|
||||
operator_id: ''
|
||||
label: Status
|
||||
description: ''
|
||||
use_operator: false
|
||||
operator: status_op
|
||||
identifier: status
|
||||
required: false
|
||||
remember: false
|
||||
multiple: false
|
||||
remember_roles:
|
||||
authenticated: authenticated
|
||||
is_grouped: true
|
||||
group_info:
|
||||
label: 'Published status'
|
||||
description: ''
|
||||
identifier: status
|
||||
optional: true
|
||||
widget: select
|
||||
multiple: false
|
||||
remember: false
|
||||
default_group: All
|
||||
default_group_multiple: { }
|
||||
group_items:
|
||||
1:
|
||||
title: Published
|
||||
operator: '='
|
||||
value: '1'
|
||||
2:
|
||||
title: Unpublished
|
||||
operator: '='
|
||||
value: '0'
|
||||
plugin_id: boolean
|
||||
entity_type: node
|
||||
entity_field: status
|
||||
type:
|
||||
id: type
|
||||
table: node_field_data
|
||||
field: type
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
operator: in
|
||||
value: { }
|
||||
group: 1
|
||||
exposed: true
|
||||
expose:
|
||||
operator_id: type_op
|
||||
label: 'Content type'
|
||||
description: ''
|
||||
use_operator: false
|
||||
operator: type_op
|
||||
identifier: type
|
||||
required: false
|
||||
remember: false
|
||||
multiple: false
|
||||
remember_roles:
|
||||
authenticated: authenticated
|
||||
anonymous: '0'
|
||||
administrator: '0'
|
||||
reduce: false
|
||||
is_grouped: false
|
||||
group_info:
|
||||
label: ''
|
||||
description: ''
|
||||
identifier: ''
|
||||
optional: true
|
||||
widget: select
|
||||
multiple: false
|
||||
remember: false
|
||||
default_group: All
|
||||
default_group_multiple: { }
|
||||
group_items: { }
|
||||
plugin_id: bundle
|
||||
entity_type: node
|
||||
entity_field: type
|
||||
title:
|
||||
id: title
|
||||
table: node_field_data
|
||||
field: title
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
operator: contains
|
||||
value: ''
|
||||
group: 1
|
||||
exposed: true
|
||||
expose:
|
||||
operator_id: title_op
|
||||
label: Title
|
||||
description: ''
|
||||
use_operator: false
|
||||
operator: title_op
|
||||
identifier: title
|
||||
required: false
|
||||
remember: false
|
||||
multiple: false
|
||||
remember_roles:
|
||||
authenticated: authenticated
|
||||
anonymous: '0'
|
||||
administrator: '0'
|
||||
is_grouped: false
|
||||
group_info:
|
||||
label: ''
|
||||
description: ''
|
||||
identifier: ''
|
||||
optional: true
|
||||
widget: select
|
||||
multiple: false
|
||||
remember: false
|
||||
default_group: All
|
||||
default_group_multiple: { }
|
||||
group_items: { }
|
||||
plugin_id: string
|
||||
entity_type: node
|
||||
entity_field: title
|
||||
langcode:
|
||||
id: langcode
|
||||
table: node_field_data
|
||||
field: langcode
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
operator: in
|
||||
value: { }
|
||||
group: 1
|
||||
exposed: true
|
||||
expose:
|
||||
operator_id: langcode_op
|
||||
label: Language
|
||||
description: ''
|
||||
use_operator: false
|
||||
operator: langcode_op
|
||||
identifier: langcode
|
||||
required: false
|
||||
remember: false
|
||||
multiple: false
|
||||
remember_roles:
|
||||
authenticated: authenticated
|
||||
anonymous: '0'
|
||||
administrator: '0'
|
||||
reduce: false
|
||||
is_grouped: false
|
||||
group_info:
|
||||
label: ''
|
||||
description: ''
|
||||
identifier: ''
|
||||
optional: true
|
||||
widget: select
|
||||
multiple: false
|
||||
remember: false
|
||||
default_group: All
|
||||
default_group_multiple: { }
|
||||
group_items: { }
|
||||
plugin_id: language
|
||||
entity_type: node
|
||||
entity_field: langcode
|
||||
sorts: { }
|
||||
title: Content
|
||||
empty:
|
||||
area_text_custom:
|
||||
id: area_text_custom
|
||||
table: views
|
||||
field: area_text_custom
|
||||
empty: true
|
||||
content: 'No content available.'
|
||||
plugin_id: text_custom
|
||||
arguments: { }
|
||||
relationships:
|
||||
uid:
|
||||
id: uid
|
||||
table: node_field_data
|
||||
field: uid
|
||||
admin_label: author
|
||||
required: true
|
||||
plugin_id: standard
|
||||
show_admin_links: false
|
||||
filter_groups:
|
||||
operator: AND
|
||||
groups:
|
||||
1: AND
|
||||
display_extenders: { }
|
||||
display_plugin: default
|
||||
display_title: Master
|
||||
id: default
|
||||
position: 0
|
||||
cache_metadata:
|
||||
contexts:
|
||||
- 'languages:language_content'
|
||||
- 'languages:language_interface'
|
||||
- url
|
||||
- url.query_args
|
||||
- user
|
||||
- 'user.node_grants:view'
|
||||
- user.permissions
|
||||
max-age: 0
|
||||
tags: { }
|
||||
page_1:
|
||||
display_options:
|
||||
path: admin/content/node
|
||||
menu:
|
||||
type: 'default tab'
|
||||
title: Content
|
||||
description: ''
|
||||
menu_name: admin
|
||||
weight: -10
|
||||
context: ''
|
||||
tab_options:
|
||||
type: normal
|
||||
title: Content
|
||||
description: 'Find and manage content'
|
||||
menu_name: admin
|
||||
weight: -10
|
||||
display_extenders: { }
|
||||
display_plugin: page
|
||||
display_title: Page
|
||||
id: page_1
|
||||
position: 1
|
||||
cache_metadata:
|
||||
contexts:
|
||||
- 'languages:language_content'
|
||||
- 'languages:language_interface'
|
||||
- url
|
||||
- url.query_args
|
||||
- user
|
||||
- 'user.node_grants:view'
|
||||
- user.permissions
|
||||
max-age: 0
|
||||
tags: { }
|
|
@ -119,7 +119,7 @@ display:
|
|||
field_api_classes: false
|
||||
filters:
|
||||
status:
|
||||
value: true
|
||||
value: '1'
|
||||
table: node_field_data
|
||||
field: status
|
||||
plugin_id: boolean
|
||||
|
|
|
@ -0,0 +1,216 @@
|
|||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- core.entity_view_mode.node.teaser
|
||||
- user.role.authenticated
|
||||
module:
|
||||
- node
|
||||
- rest
|
||||
- user
|
||||
id: rest_export_with_authorization
|
||||
label: 'Rest Export'
|
||||
module: views
|
||||
description: ''
|
||||
tag: ''
|
||||
base_table: node_field_data
|
||||
base_field: nid
|
||||
core: 8.x
|
||||
display:
|
||||
default:
|
||||
display_plugin: default
|
||||
id: default
|
||||
display_title: Master
|
||||
position: 0
|
||||
display_options:
|
||||
access:
|
||||
type: role
|
||||
options:
|
||||
role:
|
||||
authenticated: authenticated
|
||||
cache:
|
||||
type: tag
|
||||
options: { }
|
||||
query:
|
||||
type: views_query
|
||||
options:
|
||||
disable_sql_rewrite: false
|
||||
distinct: false
|
||||
replica: false
|
||||
query_comment: ''
|
||||
query_tags: { }
|
||||
exposed_form:
|
||||
type: basic
|
||||
options:
|
||||
submit_button: Apply
|
||||
reset_button: false
|
||||
reset_button_label: Reset
|
||||
exposed_sorts_label: 'Sort by'
|
||||
expose_sort_order: true
|
||||
sort_asc_label: Asc
|
||||
sort_desc_label: Desc
|
||||
pager:
|
||||
type: full
|
||||
options:
|
||||
items_per_page: 10
|
||||
offset: 0
|
||||
id: 0
|
||||
total_pages: null
|
||||
expose:
|
||||
items_per_page: false
|
||||
items_per_page_label: 'Items per page'
|
||||
items_per_page_options: '5, 10, 25, 50'
|
||||
items_per_page_options_all: false
|
||||
items_per_page_options_all_label: '- All -'
|
||||
offset: false
|
||||
offset_label: Offset
|
||||
tags:
|
||||
previous: '‹ Previous'
|
||||
next: 'Next ›'
|
||||
first: '« First'
|
||||
last: 'Last »'
|
||||
quantity: 9
|
||||
style:
|
||||
type: default
|
||||
row:
|
||||
type: 'entity:node'
|
||||
options:
|
||||
view_mode: teaser
|
||||
fields:
|
||||
title:
|
||||
id: title
|
||||
table: node_field_data
|
||||
field: title
|
||||
entity_type: node
|
||||
entity_field: title
|
||||
label: ''
|
||||
alter:
|
||||
alter_text: false
|
||||
make_link: false
|
||||
absolute: false
|
||||
trim: false
|
||||
word_boundary: false
|
||||
ellipsis: false
|
||||
strip_tags: false
|
||||
html: false
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
settings:
|
||||
link_to_entity: true
|
||||
plugin_id: field
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
exclude: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: true
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_alter_empty: true
|
||||
click_sort_column: value
|
||||
type: string
|
||||
group_column: value
|
||||
group_columns: { }
|
||||
group_rows: true
|
||||
delta_limit: 0
|
||||
delta_offset: 0
|
||||
delta_reversed: false
|
||||
delta_first_last: false
|
||||
multi_type: separator
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
filters:
|
||||
status:
|
||||
id: status
|
||||
table: node_field_data
|
||||
field: status
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
operator: '='
|
||||
value: '0'
|
||||
group: 1
|
||||
exposed: false
|
||||
expose:
|
||||
operator_id: ''
|
||||
label: ''
|
||||
description: ''
|
||||
use_operator: false
|
||||
operator: ''
|
||||
identifier: ''
|
||||
required: false
|
||||
remember: false
|
||||
multiple: false
|
||||
remember_roles:
|
||||
authenticated: authenticated
|
||||
is_grouped: false
|
||||
group_info:
|
||||
label: ''
|
||||
description: ''
|
||||
identifier: ''
|
||||
optional: true
|
||||
widget: select
|
||||
multiple: false
|
||||
remember: false
|
||||
default_group: All
|
||||
default_group_multiple: { }
|
||||
group_items: { }
|
||||
plugin_id: boolean
|
||||
entity_type: node
|
||||
entity_field: status
|
||||
sorts:
|
||||
created:
|
||||
id: created
|
||||
table: node_field_data
|
||||
field: created
|
||||
order: DESC
|
||||
entity_type: node
|
||||
entity_field: created
|
||||
plugin_id: date
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
exposed: false
|
||||
expose:
|
||||
label: ''
|
||||
granularity: second
|
||||
title: 'Rest Export'
|
||||
header: { }
|
||||
footer: { }
|
||||
empty: { }
|
||||
relationships: { }
|
||||
arguments: { }
|
||||
display_extenders: { }
|
||||
cache_metadata:
|
||||
max-age: -1
|
||||
contexts:
|
||||
- 'languages:language_content'
|
||||
- 'languages:language_interface'
|
||||
- url.query_args
|
||||
- 'user.node_grants:view'
|
||||
- user.roles
|
||||
tags: { }
|
||||
rest_export_1:
|
||||
display_plugin: rest_export
|
||||
id: rest_export_1
|
||||
display_title: 'REST export'
|
||||
position: 2
|
||||
display_options:
|
||||
display_extenders: { }
|
||||
path: unpublished-content
|
||||
auth:
|
||||
basic_auth: basic_auth
|
||||
cache_metadata:
|
||||
max-age: -1
|
||||
contexts:
|
||||
- 'languages:language_content'
|
||||
- 'languages:language_interface'
|
||||
- request_format
|
||||
- 'user.node_grants:view'
|
||||
- user.roles
|
||||
tags: { }
|
|
@ -121,7 +121,7 @@ display:
|
|||
field_api_classes: false
|
||||
filters:
|
||||
status:
|
||||
value: true
|
||||
value: '1'
|
||||
table: node_field_data
|
||||
field: status
|
||||
plugin_id: boolean
|
||||
|
|
|
@ -115,7 +115,7 @@ display:
|
|||
hide_alter_empty: true
|
||||
filters:
|
||||
status:
|
||||
value: true
|
||||
value: '1'
|
||||
table: node_field_data
|
||||
field: status
|
||||
plugin_id: boolean
|
||||
|
|
|
@ -130,7 +130,7 @@ display:
|
|||
field_api_classes: false
|
||||
filters:
|
||||
status:
|
||||
value: true
|
||||
value: '1'
|
||||
table: node_field_data
|
||||
field: status
|
||||
plugin_id: boolean
|
||||
|
|
|
@ -110,7 +110,7 @@ display:
|
|||
hide_alter_empty: true
|
||||
filters:
|
||||
status:
|
||||
value: true
|
||||
value: '1'
|
||||
table: node_field_data
|
||||
field: status
|
||||
plugin_id: boolean
|
||||
|
|
|
@ -0,0 +1,616 @@
|
|||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
module:
|
||||
- node
|
||||
- user
|
||||
id: test_content_ajax
|
||||
label: Content
|
||||
module: node
|
||||
description: 'Find and manage content.'
|
||||
tag: default
|
||||
base_table: node_field_data
|
||||
base_field: nid
|
||||
core: 8.x
|
||||
display:
|
||||
default:
|
||||
display_options:
|
||||
use_ajax: true
|
||||
access:
|
||||
type: perm
|
||||
options:
|
||||
perm: 'access content overview'
|
||||
cache:
|
||||
type: tag
|
||||
query:
|
||||
type: views_query
|
||||
exposed_form:
|
||||
type: basic
|
||||
options:
|
||||
submit_button: Filter
|
||||
reset_button: true
|
||||
reset_button_label: Reset
|
||||
exposed_sorts_label: 'Sort by'
|
||||
expose_sort_order: true
|
||||
sort_asc_label: Asc
|
||||
sort_desc_label: Desc
|
||||
pager:
|
||||
type: full
|
||||
options:
|
||||
items_per_page: 50
|
||||
offset: 0
|
||||
id: 0
|
||||
tags:
|
||||
previous: '‹ Previous'
|
||||
next: 'Next ›'
|
||||
first: '« First'
|
||||
last: 'Last »'
|
||||
expose:
|
||||
items_per_page: true
|
||||
items_per_page_label: 'Items per page'
|
||||
items_per_page_options: '5, 10, 25, 50'
|
||||
items_per_page_options_all: false
|
||||
items_per_page_options_all_label: '- All -'
|
||||
offset: false
|
||||
offset_label: Offset
|
||||
quantity: 9
|
||||
style:
|
||||
type: table
|
||||
options:
|
||||
grouping: { }
|
||||
row_class: ''
|
||||
default_row_class: true
|
||||
override: true
|
||||
sticky: true
|
||||
caption: ''
|
||||
summary: ''
|
||||
description: ''
|
||||
columns:
|
||||
node_bulk_form: node_bulk_form
|
||||
title: title
|
||||
type: type
|
||||
name: name
|
||||
status: status
|
||||
changed: changed
|
||||
edit_node: edit_node
|
||||
delete_node: delete_node
|
||||
dropbutton: dropbutton
|
||||
timestamp: title
|
||||
info:
|
||||
node_bulk_form:
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
responsive: ''
|
||||
title:
|
||||
sortable: true
|
||||
default_sort_order: asc
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
responsive: ''
|
||||
type:
|
||||
sortable: true
|
||||
default_sort_order: asc
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
responsive: ''
|
||||
name:
|
||||
sortable: false
|
||||
default_sort_order: asc
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
responsive: priority-low
|
||||
status:
|
||||
sortable: true
|
||||
default_sort_order: asc
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
responsive: ''
|
||||
changed:
|
||||
sortable: true
|
||||
default_sort_order: desc
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
responsive: priority-low
|
||||
edit_node:
|
||||
sortable: false
|
||||
default_sort_order: asc
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
responsive: ''
|
||||
delete_node:
|
||||
sortable: false
|
||||
default_sort_order: asc
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
responsive: ''
|
||||
dropbutton:
|
||||
sortable: false
|
||||
default_sort_order: asc
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
responsive: ''
|
||||
timestamp:
|
||||
sortable: false
|
||||
default_sort_order: asc
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
responsive: ''
|
||||
default: changed
|
||||
empty_table: true
|
||||
row:
|
||||
type: fields
|
||||
fields:
|
||||
node_bulk_form:
|
||||
id: node_bulk_form
|
||||
table: node
|
||||
field: node_bulk_form
|
||||
label: ''
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
element_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
plugin_id: node_bulk_form
|
||||
entity_type: node
|
||||
title:
|
||||
id: title
|
||||
table: node_field_data
|
||||
field: title
|
||||
label: Title
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
element_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
entity_type: node
|
||||
entity_field: title
|
||||
type: string
|
||||
settings:
|
||||
link_to_entity: true
|
||||
plugin_id: field
|
||||
type:
|
||||
id: type
|
||||
table: node_field_data
|
||||
field: type
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
label: 'Content type'
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
text: ''
|
||||
make_link: false
|
||||
path: ''
|
||||
absolute: false
|
||||
external: false
|
||||
replace_spaces: false
|
||||
path_case: none
|
||||
trim_whitespace: false
|
||||
alt: ''
|
||||
rel: ''
|
||||
link_class: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
target: ''
|
||||
nl2br: false
|
||||
max_length: 0
|
||||
word_boundary: true
|
||||
ellipsis: true
|
||||
more_link: false
|
||||
more_link_text: ''
|
||||
more_link_path: ''
|
||||
strip_tags: false
|
||||
trim: false
|
||||
preserve_tags: ''
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: true
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
click_sort_column: target_id
|
||||
type: entity_reference_label
|
||||
settings:
|
||||
link: false
|
||||
group_column: target_id
|
||||
group_columns: { }
|
||||
group_rows: true
|
||||
delta_limit: 0
|
||||
delta_offset: 0
|
||||
delta_reversed: false
|
||||
delta_first_last: false
|
||||
multi_type: separator
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
entity_type: node
|
||||
entity_field: type
|
||||
plugin_id: field
|
||||
name:
|
||||
id: name
|
||||
table: users_field_data
|
||||
field: name
|
||||
relationship: uid
|
||||
label: Author
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
element_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
plugin_id: field
|
||||
type: user_name
|
||||
entity_type: user
|
||||
entity_field: name
|
||||
status:
|
||||
id: status
|
||||
table: node_field_data
|
||||
field: status
|
||||
label: Status
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
element_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
type: boolean
|
||||
settings:
|
||||
format: custom
|
||||
format_custom_true: Published
|
||||
format_custom_false: Unpublished
|
||||
plugin_id: field
|
||||
entity_type: node
|
||||
entity_field: status
|
||||
changed:
|
||||
id: changed
|
||||
table: node_field_data
|
||||
field: changed
|
||||
label: Updated
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
element_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
type: timestamp
|
||||
settings:
|
||||
date_format: short
|
||||
custom_date_format: ''
|
||||
timezone: ''
|
||||
plugin_id: field
|
||||
entity_type: node
|
||||
entity_field: changed
|
||||
operations:
|
||||
id: operations
|
||||
table: node
|
||||
field: operations
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
label: Operations
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
text: ''
|
||||
make_link: false
|
||||
path: ''
|
||||
absolute: false
|
||||
external: false
|
||||
replace_spaces: false
|
||||
path_case: none
|
||||
trim_whitespace: false
|
||||
alt: ''
|
||||
rel: ''
|
||||
link_class: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
target: ''
|
||||
nl2br: false
|
||||
max_length: 0
|
||||
word_boundary: true
|
||||
ellipsis: true
|
||||
more_link: false
|
||||
more_link_text: ''
|
||||
more_link_path: ''
|
||||
strip_tags: false
|
||||
trim: false
|
||||
preserve_tags: ''
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: true
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
destination: true
|
||||
plugin_id: entity_operations
|
||||
filters:
|
||||
status_extra:
|
||||
id: status_extra
|
||||
table: node_field_data
|
||||
field: status_extra
|
||||
operator: '='
|
||||
value: false
|
||||
plugin_id: node_status
|
||||
group: 1
|
||||
entity_type: node
|
||||
status:
|
||||
id: status
|
||||
table: node_field_data
|
||||
field: status
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
operator: '='
|
||||
value: '1'
|
||||
group: 1
|
||||
exposed: true
|
||||
expose:
|
||||
operator_id: ''
|
||||
label: Status
|
||||
description: ''
|
||||
use_operator: false
|
||||
operator: status_op
|
||||
identifier: status
|
||||
required: false
|
||||
remember: false
|
||||
multiple: false
|
||||
remember_roles:
|
||||
authenticated: authenticated
|
||||
is_grouped: true
|
||||
group_info:
|
||||
label: 'Published status'
|
||||
description: ''
|
||||
identifier: status
|
||||
optional: true
|
||||
widget: select
|
||||
multiple: false
|
||||
remember: false
|
||||
default_group: All
|
||||
default_group_multiple: { }
|
||||
group_items:
|
||||
1:
|
||||
title: Published
|
||||
operator: '='
|
||||
value: '1'
|
||||
2:
|
||||
title: Unpublished
|
||||
operator: '='
|
||||
value: '0'
|
||||
plugin_id: boolean
|
||||
entity_type: node
|
||||
entity_field: status
|
||||
type:
|
||||
id: type
|
||||
table: node_field_data
|
||||
field: type
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
operator: in
|
||||
value: { }
|
||||
group: 1
|
||||
exposed: true
|
||||
expose:
|
||||
operator_id: type_op
|
||||
label: 'Content type'
|
||||
description: ''
|
||||
use_operator: false
|
||||
operator: type_op
|
||||
identifier: type
|
||||
required: false
|
||||
remember: false
|
||||
multiple: false
|
||||
remember_roles:
|
||||
authenticated: authenticated
|
||||
anonymous: '0'
|
||||
administrator: '0'
|
||||
reduce: false
|
||||
is_grouped: false
|
||||
group_info:
|
||||
label: ''
|
||||
description: ''
|
||||
identifier: ''
|
||||
optional: true
|
||||
widget: select
|
||||
multiple: false
|
||||
remember: false
|
||||
default_group: All
|
||||
default_group_multiple: { }
|
||||
group_items: { }
|
||||
plugin_id: bundle
|
||||
entity_type: node
|
||||
entity_field: type
|
||||
title:
|
||||
id: title
|
||||
table: node_field_data
|
||||
field: title
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
operator: contains
|
||||
value: ''
|
||||
group: 1
|
||||
exposed: true
|
||||
expose:
|
||||
operator_id: title_op
|
||||
label: Title
|
||||
description: ''
|
||||
use_operator: false
|
||||
operator: title_op
|
||||
identifier: title
|
||||
required: false
|
||||
remember: false
|
||||
multiple: false
|
||||
remember_roles:
|
||||
authenticated: authenticated
|
||||
anonymous: '0'
|
||||
administrator: '0'
|
||||
is_grouped: false
|
||||
group_info:
|
||||
label: ''
|
||||
description: ''
|
||||
identifier: ''
|
||||
optional: true
|
||||
widget: select
|
||||
multiple: false
|
||||
remember: false
|
||||
default_group: All
|
||||
default_group_multiple: { }
|
||||
group_items: { }
|
||||
plugin_id: string
|
||||
entity_type: node
|
||||
entity_field: title
|
||||
langcode:
|
||||
id: langcode
|
||||
table: node_field_data
|
||||
field: langcode
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
operator: in
|
||||
value: { }
|
||||
group: 1
|
||||
exposed: true
|
||||
expose:
|
||||
operator_id: langcode_op
|
||||
label: Language
|
||||
description: ''
|
||||
use_operator: false
|
||||
operator: langcode_op
|
||||
identifier: langcode
|
||||
required: false
|
||||
remember: false
|
||||
multiple: false
|
||||
remember_roles:
|
||||
authenticated: authenticated
|
||||
anonymous: '0'
|
||||
administrator: '0'
|
||||
reduce: false
|
||||
is_grouped: false
|
||||
group_info:
|
||||
label: ''
|
||||
description: ''
|
||||
identifier: ''
|
||||
optional: true
|
||||
widget: select
|
||||
multiple: false
|
||||
remember: false
|
||||
default_group: All
|
||||
default_group_multiple: { }
|
||||
group_items: { }
|
||||
plugin_id: language
|
||||
entity_type: node
|
||||
entity_field: langcode
|
||||
sorts: { }
|
||||
title: Content
|
||||
empty:
|
||||
area_text_custom:
|
||||
id: area_text_custom
|
||||
table: views
|
||||
field: area_text_custom
|
||||
empty: true
|
||||
content: 'No content available.'
|
||||
plugin_id: text_custom
|
||||
arguments: { }
|
||||
relationships:
|
||||
uid:
|
||||
id: uid
|
||||
table: node_field_data
|
||||
field: uid
|
||||
admin_label: author
|
||||
required: true
|
||||
plugin_id: standard
|
||||
show_admin_links: false
|
||||
filter_groups:
|
||||
operator: AND
|
||||
groups:
|
||||
1: AND
|
||||
display_extenders: { }
|
||||
display_plugin: default
|
||||
display_title: Master
|
||||
id: default
|
||||
position: 0
|
||||
cache_metadata:
|
||||
contexts:
|
||||
- 'languages:language_content'
|
||||
- 'languages:language_interface'
|
||||
- url
|
||||
- url.query_args
|
||||
- user
|
||||
- 'user.node_grants:view'
|
||||
- user.permissions
|
||||
max-age: 0
|
||||
tags: { }
|
||||
page_1:
|
||||
display_options:
|
||||
path: test-content-ajax
|
||||
menu:
|
||||
type: 'default tab'
|
||||
title: Content
|
||||
description: ''
|
||||
menu_name: admin
|
||||
weight: -10
|
||||
context: ''
|
||||
tab_options:
|
||||
type: normal
|
||||
title: Content
|
||||
description: 'Find and manage content'
|
||||
menu_name: admin
|
||||
weight: -10
|
||||
display_extenders: { }
|
||||
display_plugin: page
|
||||
display_title: Page
|
||||
id: page_1
|
||||
position: 1
|
||||
cache_metadata:
|
||||
contexts:
|
||||
- 'languages:language_content'
|
||||
- 'languages:language_interface'
|
||||
- url
|
||||
- url.query_args
|
||||
- user
|
||||
- 'user.node_grants:view'
|
||||
- user.permissions
|
||||
max-age: 0
|
||||
tags: { }
|
|
@ -126,7 +126,7 @@ display:
|
|||
entity_type: node
|
||||
entity_field: nid
|
||||
status:
|
||||
field: status
|
||||
field: '1'
|
||||
id: status
|
||||
table: node_field_data
|
||||
plugin_id: boolean
|
||||
|
|
|
@ -109,7 +109,7 @@ display:
|
|||
hide_alter_empty: true
|
||||
filters:
|
||||
status:
|
||||
value: true
|
||||
value: '1'
|
||||
table: node_field_data
|
||||
field: status
|
||||
plugin_id: boolean
|
||||
|
|
|
@ -35,7 +35,7 @@ display:
|
|||
group: 1
|
||||
id: status
|
||||
table: node_field_data
|
||||
value: true
|
||||
value: '1'
|
||||
plugin_id: boolean
|
||||
entity_type: node
|
||||
entity_field: status
|
||||
|
|
|
@ -115,7 +115,7 @@ display:
|
|||
group: 1
|
||||
id: status
|
||||
table: node_field_data
|
||||
value: true
|
||||
value: '1'
|
||||
plugin_id: boolean
|
||||
entity_type: node
|
||||
entity_field: status
|
||||
|
|
|
@ -215,7 +215,7 @@ display:
|
|||
destination: true
|
||||
filters:
|
||||
status:
|
||||
value: true
|
||||
value: '1'
|
||||
table: node_field_data
|
||||
field: status
|
||||
id: status
|
||||
|
|
|
@ -224,7 +224,7 @@ display:
|
|||
plugin_id: date
|
||||
filters:
|
||||
status:
|
||||
value: true
|
||||
value: '1'
|
||||
table: node_field_data
|
||||
field: status
|
||||
plugin_id: boolean
|
||||
|
|
|
@ -144,7 +144,7 @@ display:
|
|||
plugin_id: field
|
||||
filters:
|
||||
status:
|
||||
value: true
|
||||
value: '1'
|
||||
table: node_field_data
|
||||
field: status
|
||||
plugin_id: boolean
|
||||
|
|
|
@ -41,7 +41,7 @@ display:
|
|||
group: 1
|
||||
id: status
|
||||
table: node_field_data
|
||||
value: true
|
||||
value: '1'
|
||||
plugin_id: boolean
|
||||
entity_type: node
|
||||
entity_field: status
|
||||
|
|
|
@ -65,7 +65,7 @@ display:
|
|||
group: 1
|
||||
id: status
|
||||
table: node_field_data
|
||||
value: true
|
||||
value: '1'
|
||||
plugin_id: boolean
|
||||
entity_type: node
|
||||
entity_field: status
|
||||
|
@ -130,7 +130,7 @@ display:
|
|||
group: 1
|
||||
id: status
|
||||
table: node_field_data
|
||||
value: true
|
||||
value: '1'
|
||||
plugin_id: boolean
|
||||
entity_type: node
|
||||
entity_field: status
|
||||
|
|
|
@ -59,7 +59,7 @@ display:
|
|||
entity_field: title
|
||||
filters:
|
||||
status:
|
||||
value: true
|
||||
value: '1'
|
||||
table: node_field_data
|
||||
field: status
|
||||
id: status
|
||||
|
|
|
@ -107,7 +107,7 @@ display:
|
|||
comments: false
|
||||
filters:
|
||||
status:
|
||||
value: true
|
||||
value: '1'
|
||||
table: node_field_data
|
||||
field: status
|
||||
plugin_id: boolean
|
||||
|
@ -152,7 +152,7 @@ display:
|
|||
group_type: group
|
||||
admin_label: ''
|
||||
operator: '='
|
||||
value: true
|
||||
value: '1'
|
||||
group: 1
|
||||
exposed: false
|
||||
expose:
|
||||
|
|
|
@ -54,7 +54,7 @@ display:
|
|||
entity_field: title
|
||||
filters:
|
||||
status:
|
||||
value: true
|
||||
value: '1'
|
||||
table: node_field_data
|
||||
field: status
|
||||
id: status
|
||||
|
|
|
@ -59,7 +59,7 @@ display:
|
|||
entity_field: title
|
||||
filters:
|
||||
status:
|
||||
value: true
|
||||
value: '1'
|
||||
table: node_field_data
|
||||
field: status
|
||||
id: status
|
||||
|
|
|
@ -464,7 +464,7 @@ display:
|
|||
plugin_id: entity_operations
|
||||
filters:
|
||||
status:
|
||||
value: true
|
||||
value: '1'
|
||||
table: node_field_data
|
||||
field: status
|
||||
plugin_id: boolean
|
||||
|
|
|
@ -464,7 +464,7 @@ display:
|
|||
plugin_id: entity_operations
|
||||
filters:
|
||||
status:
|
||||
value: true
|
||||
value: '1'
|
||||
table: node_field_data
|
||||
field: status
|
||||
plugin_id: boolean
|
||||
|
|
|
@ -97,7 +97,7 @@ display:
|
|||
link_to_entity: true
|
||||
filters:
|
||||
status:
|
||||
value: true
|
||||
value: '1'
|
||||
table: node_field_data
|
||||
field: status
|
||||
id: status
|
||||
|
@ -135,7 +135,7 @@ display:
|
|||
display_description: ''
|
||||
filters:
|
||||
status:
|
||||
value: true
|
||||
value: '1'
|
||||
table: node_field_data
|
||||
field: status
|
||||
id: status
|
||||
|
@ -200,7 +200,7 @@ display:
|
|||
display_description: ''
|
||||
filters:
|
||||
status:
|
||||
value: true
|
||||
value: '1'
|
||||
table: node_field_data
|
||||
field: status
|
||||
id: status
|
||||
|
|
|
@ -96,7 +96,6 @@ display:
|
|||
footer: { }
|
||||
empty: { }
|
||||
relationships: { }
|
||||
fields: { }
|
||||
display_extenders: { }
|
||||
cache_metadata:
|
||||
contexts:
|
||||
|
|
|
@ -151,7 +151,7 @@ display:
|
|||
plugin_id: field
|
||||
filters:
|
||||
status:
|
||||
value: true
|
||||
value: '1'
|
||||
table: node_field_data
|
||||
field: status
|
||||
plugin_id: boolean
|
||||
|
|
|
@ -90,7 +90,7 @@ class QueryTest extends QueryPluginBase {
|
|||
// @todo You could add a string representation of the query.
|
||||
$this->view->build_info['query'] = "";
|
||||
$this->view->build_info['count_query'] = "";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
|
|
|
@ -0,0 +1,77 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\Tests\views\FunctionalJavascript;
|
||||
|
||||
use Drupal\FunctionalJavascriptTests\JavascriptTestBase;
|
||||
use Drupal\simpletest\ContentTypeCreationTrait;
|
||||
use Drupal\simpletest\NodeCreationTrait;
|
||||
use Drupal\views\Tests\ViewTestData;
|
||||
|
||||
/**
|
||||
* Tests the click sorting AJAX functionality of Views exposed forms.
|
||||
*
|
||||
* @group views
|
||||
*/
|
||||
class ClickSortingAJAXTest extends JavascriptTestBase {
|
||||
|
||||
use ContentTypeCreationTrait;
|
||||
use NodeCreationTrait;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static $modules = ['node', 'views', 'views_test_config'];
|
||||
|
||||
public static $testViews = ['test_content_ajax'];
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function setUp() {
|
||||
parent::setUp();
|
||||
|
||||
ViewTestData::createTestViews(self::class, ['views_test_config']);
|
||||
|
||||
// Create a Content type and two test nodes.
|
||||
$this->createContentType(['type' => 'page']);
|
||||
$this->createNode(['title' => 'Page A', 'changed' => REQUEST_TIME]);
|
||||
$this->createNode(['title' => 'Page B', 'changed' => REQUEST_TIME + 1000]);
|
||||
|
||||
// Create a user privileged enough to view content.
|
||||
$user = $this->drupalCreateUser([
|
||||
'administer site configuration',
|
||||
'access content',
|
||||
'access content overview',
|
||||
]);
|
||||
$this->drupalLogin($user);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests if sorting via AJAX works for the "Content" View.
|
||||
*/
|
||||
public function testClickSorting() {
|
||||
// Visit the content page.
|
||||
$this->drupalGet('test-content-ajax');
|
||||
|
||||
$session_assert = $this->assertSession();
|
||||
|
||||
$page = $this->getSession()->getPage();
|
||||
|
||||
// Ensure that the Content we're testing for is in the right order, default
|
||||
// sorting is by changed timestamp so the last created node should be first.
|
||||
/** @var \Behat\Mink\Element\NodeElement[] $rows */
|
||||
$rows = $page->findAll('css', 'tbody tr');
|
||||
$this->assertCount(2, $rows);
|
||||
$this->assertContains('Page B', $rows[0]->getHtml());
|
||||
$this->assertContains('Page A', $rows[1]->getHtml());
|
||||
|
||||
// Now sort by title and check if the order changed.
|
||||
$page->clickLink('Title');
|
||||
$session_assert->assertWaitOnAjaxRequest();
|
||||
$rows = $page->findAll('css', 'tbody tr');
|
||||
$this->assertCount(2, $rows);
|
||||
$this->assertContains('Page A', $rows[0]->getHtml());
|
||||
$this->assertContains('Page B', $rows[1]->getHtml());
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\Tests\views\FunctionalJavascript;
|
||||
|
||||
use Drupal\FunctionalJavascriptTests\JavascriptTestBase;
|
||||
use Drupal\simpletest\ContentTypeCreationTrait;
|
||||
use Drupal\simpletest\NodeCreationTrait;
|
||||
use Drupal\views\Tests\ViewTestData;
|
||||
|
||||
/**
|
||||
* Tests the click sorting AJAX functionality of Views exposed forms.
|
||||
*
|
||||
* @group views
|
||||
*/
|
||||
class PaginationAJAXTest extends JavascriptTestBase {
|
||||
|
||||
use ContentTypeCreationTrait;
|
||||
use NodeCreationTrait;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static $modules = ['node', 'views', 'views_test_config'];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
* Test Views to enable.
|
||||
*/
|
||||
public static $testViews = ['test_content_ajax'];
|
||||
|
||||
protected $user;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function setUp() {
|
||||
parent::setUp();
|
||||
|
||||
ViewTestData::createTestViews(self::class, ['views_test_config']);
|
||||
|
||||
// Create a Content type and eleven test nodes.
|
||||
$this->createContentType(['type' => 'page']);
|
||||
for ($i = 1; $i <= 11; $i++) {
|
||||
$this->createNode(['title' => 'Node ' . $i . ' content', 'changed' => $i * 1000]);
|
||||
}
|
||||
|
||||
// Create a user privileged enough to view content.
|
||||
$user = $this->drupalCreateUser([
|
||||
'administer site configuration',
|
||||
'access content',
|
||||
'access content overview',
|
||||
]);
|
||||
$this->drupalLogin($user);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests if pagination via AJAX works for the "Content" View.
|
||||
*/
|
||||
public function testBasicPagination() {
|
||||
// Visit the content page.
|
||||
$this->drupalGet('test-content-ajax');
|
||||
|
||||
$session_assert = $this->assertSession();
|
||||
|
||||
$page = $this->getSession()->getPage();
|
||||
|
||||
// Set the number of items displayed per page to 5 using the exposed pager.
|
||||
$page->selectFieldOption('edit-items-per-page', 5);
|
||||
$page->pressButton('Filter');
|
||||
$session_assert->assertWaitOnAjaxRequest();
|
||||
|
||||
// Change 'Updated' sorting from descending to ascending.
|
||||
$page->clickLink('Updated');
|
||||
$session_assert->assertWaitOnAjaxRequest();
|
||||
|
||||
// Use the pager by clicking on the links and test if we see the expected
|
||||
// number of rows on each page. For easy targeting the titles of the pager
|
||||
// links are used.
|
||||
/** @var \Behat\Mink\Element\NodeElement[] $rows */
|
||||
$rows = $page->findAll('css', 'tbody tr');
|
||||
$this->assertCount(5, $rows);
|
||||
$this->assertContains('Node 1 content', $rows[0]->getHtml());
|
||||
|
||||
$this->clickLink('Go to page 2');
|
||||
$session_assert->assertWaitOnAjaxRequest();
|
||||
$rows = $page->findAll('css', 'tbody tr');
|
||||
$this->assertCount(5, $rows);
|
||||
$this->assertContains('Node 6 content', $rows[0]->getHtml());
|
||||
|
||||
$this->clickLink('Go to page 3');
|
||||
$session_assert->assertWaitOnAjaxRequest();
|
||||
$rows = $page->findAll('css', 'tbody tr');
|
||||
$this->assertCount(1, $rows);
|
||||
$this->assertContains('Node 11 content', $rows[0]->getHtml());
|
||||
|
||||
// Navigate back to the first page.
|
||||
$this->clickLink('Go to first page');
|
||||
$session_assert->assertWaitOnAjaxRequest();
|
||||
$rows = $page->findAll('css', 'tbody tr');
|
||||
$this->assertCount(5, $rows);
|
||||
$this->assertContains('Node 1 content', $rows[0]->getHtml());
|
||||
|
||||
// Navigate using the 'next' link.
|
||||
$this->clickLink('Go to next page');
|
||||
$session_assert->assertWaitOnAjaxRequest();
|
||||
$rows = $page->findAll('css', 'tbody tr');
|
||||
$this->assertCount(5, $rows);
|
||||
$this->assertContains('Node 6 content', $rows[0]->getHtml());
|
||||
|
||||
// Navigate using the 'last' link.
|
||||
$this->clickLink('Go to last page');
|
||||
$session_assert->assertWaitOnAjaxRequest();
|
||||
$rows = $page->findAll('css', 'tbody tr');
|
||||
$this->assertCount(1, $rows);
|
||||
$this->assertContains('Node 11 content', $rows[0]->getHtml());
|
||||
}
|
||||
|
||||
}
|
|
@ -12,12 +12,17 @@ use Drupal\views\Views;
|
|||
*/
|
||||
class FilterCombineTest extends ViewsKernelTestBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static $modules = array('entity_test');
|
||||
|
||||
/**
|
||||
* Views used by this test.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public static $testViews = array('test_view');
|
||||
public static $testViews = array('test_view', 'entity_test_fields');
|
||||
|
||||
/**
|
||||
* Map column names.
|
||||
|
@ -29,6 +34,15 @@ class FilterCombineTest extends ViewsKernelTestBase {
|
|||
'views_test_data_job' => 'job',
|
||||
);
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function setUp($import_test_views = TRUE) {
|
||||
parent::setUp($import_test_views);
|
||||
|
||||
$this->installEntitySchema('entity_test');
|
||||
}
|
||||
|
||||
public function testFilterCombineContains() {
|
||||
$view = Views::getView('test_view');
|
||||
$view->setDisplay();
|
||||
|
@ -126,7 +140,42 @@ class FilterCombineTest extends ViewsKernelTestBase {
|
|||
$this->assertTrue($view->build_info['fail'], "View build has been marked as failed.");
|
||||
// Make sure this view does not pass validation with the right error.
|
||||
$errors = $view->validate();
|
||||
$this->assertEqual(reset($errors['default']), t('Field %field set in %filter is not set in this display.', array('%field' => 'dummy', '%filter' => 'Global: Combine fields filter')));
|
||||
$this->assertEquals(t('Field %field set in %filter is not set in display %display.', array('%field' => 'dummy', '%filter' => 'Global: Combine fields filter', '%display' => 'Master')), reset($errors['default']));
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests that the combine field filter is not valid on displays that don't use
|
||||
* fields.
|
||||
*/
|
||||
public function testNonFieldsRow() {
|
||||
$view = Views::getView('entity_test_fields');
|
||||
$view->setDisplay();
|
||||
|
||||
// Set the rows to a plugin type that doesn't support fields.
|
||||
$view->displayHandlers->get('default')->overrideOption('row', array(
|
||||
'type' => 'entity:entity_test',
|
||||
'options' => array(
|
||||
'view_mode' => 'teaser',
|
||||
),
|
||||
));
|
||||
// Change the filtering.
|
||||
$view->displayHandlers->get('default')->overrideOption('filters', array(
|
||||
'name' => array(
|
||||
'id' => 'combine',
|
||||
'table' => 'views',
|
||||
'field' => 'combine',
|
||||
'relationship' => 'none',
|
||||
'operator' => 'contains',
|
||||
'fields' => array(
|
||||
'name',
|
||||
),
|
||||
'value' => 'ing',
|
||||
),
|
||||
));
|
||||
$this->executeView($view);
|
||||
$errors = $view->validate();
|
||||
// Check that the right error is shown.
|
||||
$this->assertEquals(t('%display: %filter can only be used on displays that use fields. Set the style or row format for that display to one using fields to use the combine field filter.', array('%filter' => 'Global: Combine fields filter', '%display' => 'Master')), reset($errors['default']));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -127,7 +127,7 @@ class FilterNumericTest extends ViewsKernelTestBase {
|
|||
$view->destroy();
|
||||
$view->setDisplay();
|
||||
|
||||
// Change the filtering
|
||||
// Change the filtering
|
||||
$view->displayHandlers->get('default')->overrideOption('filters', array(
|
||||
'age' => array(
|
||||
'id' => 'age',
|
||||
|
@ -148,10 +148,6 @@ class FilterNumericTest extends ViewsKernelTestBase {
|
|||
'name' => 'John',
|
||||
'age' => 25,
|
||||
),
|
||||
array(
|
||||
'name' => 'Paul',
|
||||
'age' => 26,
|
||||
),
|
||||
array(
|
||||
'name' => 'Meredith',
|
||||
'age' => 30,
|
||||
|
@ -208,10 +204,6 @@ class FilterNumericTest extends ViewsKernelTestBase {
|
|||
'name' => 'John',
|
||||
'age' => 25,
|
||||
),
|
||||
array(
|
||||
'name' => 'Paul',
|
||||
'age' => 26,
|
||||
),
|
||||
array(
|
||||
'name' => 'Meredith',
|
||||
'age' => 30,
|
||||
|
|
|
@ -297,7 +297,7 @@ class FilterStringTest extends ViewsKernelTestBase {
|
|||
|
||||
|
||||
function testFilterStringGroupedExposedWord() {
|
||||
$filters = $this->getGroupedExposedFilters();
|
||||
$filters = $this->getGroupedExposedFilters();
|
||||
$view = $this->getBasicPageView();
|
||||
|
||||
// Filter: Name, Operator: contains, Value: ing
|
||||
|
|
|
@ -24,61 +24,61 @@ class SortDateTest extends ViewsKernelTestBase {
|
|||
$expected = array();
|
||||
if (!$reverse) {
|
||||
switch ($granularity) {
|
||||
case 'second':
|
||||
$expected = array(
|
||||
array('name' => 'John'),
|
||||
array('name' => 'Paul'),
|
||||
array('name' => 'Meredith'),
|
||||
array('name' => 'Ringo'),
|
||||
array('name' => 'George'),
|
||||
);
|
||||
break;
|
||||
case 'minute':
|
||||
$expected = array(
|
||||
array('name' => 'John'),
|
||||
array('name' => 'Paul'),
|
||||
array('name' => 'Ringo'),
|
||||
array('name' => 'Meredith'),
|
||||
array('name' => 'George'),
|
||||
);
|
||||
break;
|
||||
case 'hour':
|
||||
$expected = array(
|
||||
array('name' => 'John'),
|
||||
array('name' => 'Ringo'),
|
||||
array('name' => 'Paul'),
|
||||
array('name' => 'Meredith'),
|
||||
array('name' => 'George'),
|
||||
);
|
||||
break;
|
||||
case 'day':
|
||||
$expected = array(
|
||||
array('name' => 'John'),
|
||||
array('name' => 'Ringo'),
|
||||
array('name' => 'Paul'),
|
||||
array('name' => 'Meredith'),
|
||||
array('name' => 'George'),
|
||||
);
|
||||
break;
|
||||
case 'month':
|
||||
$expected = array(
|
||||
array('name' => 'John'),
|
||||
array('name' => 'George'),
|
||||
array('name' => 'Ringo'),
|
||||
array('name' => 'Paul'),
|
||||
array('name' => 'Meredith'),
|
||||
);
|
||||
break;
|
||||
case 'year':
|
||||
$expected = array(
|
||||
array('name' => 'John'),
|
||||
array('name' => 'George'),
|
||||
array('name' => 'Ringo'),
|
||||
array('name' => 'Paul'),
|
||||
array('name' => 'Meredith'),
|
||||
);
|
||||
break;
|
||||
}
|
||||
case 'second':
|
||||
$expected = array(
|
||||
array('name' => 'John'),
|
||||
array('name' => 'Paul'),
|
||||
array('name' => 'Meredith'),
|
||||
array('name' => 'Ringo'),
|
||||
array('name' => 'George'),
|
||||
);
|
||||
break;
|
||||
case 'minute':
|
||||
$expected = array(
|
||||
array('name' => 'John'),
|
||||
array('name' => 'Paul'),
|
||||
array('name' => 'Ringo'),
|
||||
array('name' => 'Meredith'),
|
||||
array('name' => 'George'),
|
||||
);
|
||||
break;
|
||||
case 'hour':
|
||||
$expected = array(
|
||||
array('name' => 'John'),
|
||||
array('name' => 'Ringo'),
|
||||
array('name' => 'Paul'),
|
||||
array('name' => 'Meredith'),
|
||||
array('name' => 'George'),
|
||||
);
|
||||
break;
|
||||
case 'day':
|
||||
$expected = array(
|
||||
array('name' => 'John'),
|
||||
array('name' => 'Ringo'),
|
||||
array('name' => 'Paul'),
|
||||
array('name' => 'Meredith'),
|
||||
array('name' => 'George'),
|
||||
);
|
||||
break;
|
||||
case 'month':
|
||||
$expected = array(
|
||||
array('name' => 'John'),
|
||||
array('name' => 'George'),
|
||||
array('name' => 'Ringo'),
|
||||
array('name' => 'Paul'),
|
||||
array('name' => 'Meredith'),
|
||||
);
|
||||
break;
|
||||
case 'year':
|
||||
$expected = array(
|
||||
array('name' => 'John'),
|
||||
array('name' => 'George'),
|
||||
array('name' => 'Ringo'),
|
||||
array('name' => 'Paul'),
|
||||
array('name' => 'Meredith'),
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
switch ($granularity) {
|
||||
|
|
|
@ -199,7 +199,7 @@ class ModuleTest extends ViewsKernelTestBase {
|
|||
$expected_opt_groups = array();
|
||||
foreach ($all_views as $view) {
|
||||
foreach ($view->get('display') as $display) {
|
||||
$expected_opt_groups[$view->id()][$view->id() . ':' . $display['id']] = (string) t('@view : @display', array('@view' => $view->id(), '@display' => $display['id']));
|
||||
$expected_opt_groups[$view->id()][$view->id() . ':' . $display['id']] = (string) t('@view : @display', array('@view' => $view->id(), '@display' => $display['id']));
|
||||
}
|
||||
}
|
||||
$this->assertIdentical($expected_opt_groups, $this->castSafeStrings(Views::getViewsAsOptions(FALSE, 'all', NULL, TRUE)), 'Expected option array for an option group returned.');
|
||||
|
|
|
@ -6,7 +6,7 @@ use Drupal\views\Views;
|
|||
use Drupal\Tests\views\Kernel\ViewsKernelTestBase;
|
||||
use Drupal\views\Plugin\views\style\StylePluginBase;
|
||||
use Drupal\views\Plugin\views\access\AccessPluginBase;
|
||||
use Drupal\views\Plugin\views\exposed_form\ExposedFormPluginBase;
|
||||
use Drupal\views\Plugin\views\exposed_form\ExposedFormPluginInterface;
|
||||
use Drupal\views\Plugin\views\pager\PagerPluginBase;
|
||||
use Drupal\views\Plugin\views\query\QueryPluginBase;
|
||||
use Drupal\views\Plugin\views\cache\CachePluginBase;
|
||||
|
@ -96,7 +96,7 @@ class DisplayKernelTest extends ViewsKernelTestBase {
|
|||
|
||||
$this->assertTrue($display_handler->getPlugin('access') instanceof AccessPluginBase, 'An access plugin instance was returned.');
|
||||
$this->assertTrue($display_handler->getPlugin('cache') instanceof CachePluginBase, 'A cache plugin instance was returned.');
|
||||
$this->assertTrue($display_handler->getPlugin('exposed_form') instanceof ExposedFormPluginBase, 'An exposed_form plugin instance was returned.');
|
||||
$this->assertTrue($display_handler->getPlugin('exposed_form') instanceof ExposedFormPluginInterface, 'An exposed_form plugin instance was returned.');
|
||||
$this->assertTrue($display_handler->getPlugin('pager') instanceof PagerPluginBase, 'A pager plugin instance was returned.');
|
||||
$this->assertTrue($display_handler->getPlugin('query') instanceof QueryPluginBase, 'A query plugin instance was returned.');
|
||||
$this->assertTrue($display_handler->getPlugin('row') instanceof RowPluginBase, 'A row plugin instance was returned.');
|
||||
|
|
|
@ -99,7 +99,7 @@ class ViewExecutableTest extends ViewsKernelTestBase {
|
|||
public function testFactoryService() {
|
||||
$factory = $this->container->get('views.executable');
|
||||
$this->assertTrue($factory instanceof ViewExecutableFactory, 'A ViewExecutableFactory instance was returned from the container.');
|
||||
$view = entity_load('view', 'test_executable_displays');
|
||||
$view = View::load('test_executable_displays');
|
||||
$this->assertTrue($factory->get($view) instanceof ViewExecutable, 'A ViewExecutable instance was returned from the factory.');
|
||||
}
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ class ViewStorageTest extends ViewsKernelTestBase {
|
|||
* Tests loading configuration entities.
|
||||
*/
|
||||
protected function loadTests() {
|
||||
$view = entity_load('view', 'test_view_storage');
|
||||
$view = View::load('test_view_storage');
|
||||
$data = $this->config('views.view.test_view_storage')->get();
|
||||
|
||||
// Confirm that an actual view object is loaded and that it returns all of
|
||||
|
@ -143,7 +143,7 @@ class ViewStorageTest extends ViewsKernelTestBase {
|
|||
|
||||
// Check the UUID of the loaded View.
|
||||
$created->save();
|
||||
$created_loaded = entity_load('view', 'test_view_storage_new');
|
||||
$created_loaded = View::load('test_view_storage_new');
|
||||
$this->assertIdentical($created->uuid(), $created_loaded->uuid(), 'The created UUID has been saved correctly.');
|
||||
}
|
||||
|
||||
|
@ -152,7 +152,7 @@ class ViewStorageTest extends ViewsKernelTestBase {
|
|||
*/
|
||||
protected function displayTests() {
|
||||
// Check whether a display can be added and saved to a View.
|
||||
$view = entity_load('view', 'test_view_storage_new');
|
||||
$view = View::load('test_view_storage_new');
|
||||
|
||||
$new_id = $view->addDisplay('page', 'Test', 'test');
|
||||
$display = $view->get('display');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\Tests\views\Unit\Controller {
|
||||
namespace Drupal\Tests\views\Unit\Controller;
|
||||
|
||||
use Drupal\Core\Render\RenderContext;
|
||||
use Drupal\Tests\UnitTestCase;
|
||||
|
@ -358,5 +358,3 @@ class ViewAjaxControllerTest extends UnitTestCase {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Contains \Drupal\Tests\views\Unit\EntityViewsDataTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\Tests\views\Unit {
|
||||
namespace Drupal\Tests\views\Unit;
|
||||
|
||||
use Drupal\Core\Config\Entity\ConfigEntityType;
|
||||
use Drupal\Core\Entity\ContentEntityType;
|
||||
|
@ -568,7 +568,7 @@ class EntityViewsDataTest extends UnitTestCase {
|
|||
|
||||
$this->viewsData->setEntityType($entity_type);
|
||||
|
||||
// Setup the table mapping.
|
||||
// Setup the table mapping.
|
||||
$table_mapping = $this->getMockBuilder(DefaultTableMapping::class)
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
@ -717,7 +717,7 @@ class EntityViewsDataTest extends UnitTestCase {
|
|||
|
||||
$this->viewsData->setEntityType($entity_type);
|
||||
|
||||
// Setup the table mapping.
|
||||
// Setup the table mapping.
|
||||
$table_mapping = $this->getMockBuilder(DefaultTableMapping::class)
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
@ -1100,12 +1100,10 @@ class TestEntityType extends EntityType {
|
|||
|
||||
}
|
||||
|
||||
}
|
||||
namespace Drupal\entity_test\Entity;
|
||||
|
||||
namespace Drupal\entity_test\Entity {
|
||||
if (!function_exists('t')) {
|
||||
function t($string, array $args = []) {
|
||||
return strtr($string, $args);
|
||||
}
|
||||
if (!function_exists('t')) {
|
||||
function t($string, array $args = []) {
|
||||
return strtr($string, $args);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\Tests\views\Unit\Plugin\Block {
|
||||
namespace Drupal\Tests\views\Unit\Plugin\Block;
|
||||
|
||||
use Drupal\Core\DependencyInjection\ContainerBuilder;
|
||||
use Drupal\Tests\UnitTestCase;
|
||||
|
@ -198,13 +198,11 @@ class ViewsBlockTest extends UnitTestCase {
|
|||
|
||||
}
|
||||
|
||||
}
|
||||
// @todo https://www.drupal.org/node/2571679 replace
|
||||
// views_add_contextual_links().
|
||||
namespace Drupal\views\Plugin\Block;
|
||||
|
||||
namespace {
|
||||
// @todo https://www.drupal.org/node/2571679 replace
|
||||
// views_add_contextual_links().
|
||||
if (!function_exists('views_add_contextual_links')) {
|
||||
function views_add_contextual_links() {
|
||||
}
|
||||
if (!function_exists('views_add_contextual_links')) {
|
||||
function views_add_contextual_links() {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Contains \Drupal\Tests\views\Unit\Plugin\field\FieldPluginBaseTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\Tests\views\Unit\Plugin\field {
|
||||
namespace Drupal\Tests\views\Unit\Plugin\field;
|
||||
|
||||
use Drupal\Core\GeneratedUrl;
|
||||
use Drupal\Core\Language\Language;
|
||||
|
@ -692,12 +692,12 @@ class FieldPluginBaseTestField extends FieldPluginBase {
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// @todo Remove as part of https://www.drupal.org/node/2529170.
|
||||
namespace {
|
||||
if (!function_exists('base_path')) {
|
||||
function base_path() {
|
||||
return '/';
|
||||
}
|
||||
namespace Drupal\views\Plugin\views\field;
|
||||
|
||||
if (!function_exists('base_path')) {
|
||||
function base_path() {
|
||||
return '/';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -239,7 +239,7 @@ class SqlTest extends UnitTestCase {
|
|||
|
||||
/**
|
||||
* @covers ::loadEntities
|
||||
* @covers ::_assignEntitiesToResult
|
||||
* @covers ::assignEntitiesToResult
|
||||
*/
|
||||
public function testLoadEntitiesWithEmptyResult() {
|
||||
$view = $this->prophesize('Drupal\views\ViewExecutable')->reveal();
|
||||
|
@ -261,7 +261,7 @@ class SqlTest extends UnitTestCase {
|
|||
|
||||
/**
|
||||
* @covers ::loadEntities
|
||||
* @covers ::_assignEntitiesToResult
|
||||
* @covers ::assignEntitiesToResult
|
||||
*/
|
||||
public function testLoadEntitiesWithNoRelationshipAndNoRevision() {
|
||||
$view = $this->prophesize('Drupal\views\ViewExecutable')->reveal();
|
||||
|
@ -317,7 +317,7 @@ class SqlTest extends UnitTestCase {
|
|||
|
||||
/**
|
||||
* @covers ::loadEntities
|
||||
* @covers ::_assignEntitiesToResult
|
||||
* @covers ::assignEntitiesToResult
|
||||
*/
|
||||
public function testLoadEntitiesWithRelationship() {
|
||||
// We don't use prophecy, because prophecy enforces methods.
|
||||
|
@ -375,7 +375,7 @@ class SqlTest extends UnitTestCase {
|
|||
|
||||
/**
|
||||
* @covers ::loadEntities
|
||||
* @covers ::_assignEntitiesToResult
|
||||
* @covers ::assignEntitiesToResult
|
||||
*/
|
||||
public function testLoadEntitiesWithNonEntityRelationship() {
|
||||
// We don't use prophecy, because prophecy enforces methods.
|
||||
|
@ -424,7 +424,7 @@ class SqlTest extends UnitTestCase {
|
|||
|
||||
/**
|
||||
* @covers ::loadEntities
|
||||
* @covers ::_assignEntitiesToResult
|
||||
* @covers ::assignEntitiesToResult
|
||||
*/
|
||||
public function testLoadEntitiesWithRevision() {
|
||||
// We don't use prophecy, because prophecy enforces methods.
|
||||
|
@ -469,7 +469,7 @@ class SqlTest extends UnitTestCase {
|
|||
|
||||
/**
|
||||
* @covers ::loadEntities
|
||||
* @covers ::_assignEntitiesToResult
|
||||
* @covers ::assignEntitiesToResult
|
||||
*/
|
||||
public function testLoadEntitiesWithRevisionOfSameEntityType() {
|
||||
// We don't use prophecy, because prophecy enforces methods.
|
||||
|
@ -529,7 +529,7 @@ class SqlTest extends UnitTestCase {
|
|||
|
||||
/**
|
||||
* @covers ::loadEntities
|
||||
* @covers ::_assignEntitiesToResult
|
||||
* @covers ::assignEntitiesToResult
|
||||
*/
|
||||
public function testLoadEntitiesWithRelationshipAndRevision() {
|
||||
// We don't use prophecy, because prophecy enforces methods.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\Tests\views\Unit\Plugin\views\field {
|
||||
namespace Drupal\Tests\views\Unit\Plugin\views\field;
|
||||
|
||||
use Drupal\Tests\UnitTestCase;
|
||||
use Drupal\views\Plugin\views\field\EntityOperations;
|
||||
|
@ -165,5 +165,3 @@ class EntityOperationsUnitTest extends UnitTestCase {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\Tests\views\Unit\Routing {
|
||||
namespace Drupal\Tests\views\Unit\Routing;
|
||||
|
||||
use Drupal\Core\Routing\RouteMatch;
|
||||
use Drupal\Tests\UnitTestCase;
|
||||
|
@ -177,13 +177,11 @@ class ViewPageControllerTest extends UnitTestCase {
|
|||
|
||||
}
|
||||
|
||||
}
|
||||
// @todo https://www.drupal.org/node/2571679 replace
|
||||
// views_add_contextual_links().
|
||||
namespace Drupal\views\Routing;
|
||||
|
||||
namespace {
|
||||
// @todo https://www.drupal.org/node/2571679 replace
|
||||
// views_add_contextual_links()
|
||||
if (!function_exists('views_add_contextual_links')) {
|
||||
function views_add_contextual_links() {
|
||||
}
|
||||
if (!function_exists('views_add_contextual_links')) {
|
||||
function views_add_contextual_links() {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -148,7 +148,7 @@ class ViewsDataTest extends UnitTestCase {
|
|||
*/
|
||||
public function testFetchBaseTables() {
|
||||
$this->setupMockedModuleHandler();
|
||||
$data = $this->viewsData->get();
|
||||
$data = $this->viewsData->getAll();
|
||||
|
||||
$base_tables = $this->viewsData->fetchBaseTables();
|
||||
|
||||
|
@ -198,7 +198,7 @@ class ViewsDataTest extends UnitTestCase {
|
|||
->will($this->returnValue(FALSE));
|
||||
|
||||
$expected_views_data = $this->viewsDataWithProvider();
|
||||
$views_data = $this->viewsData->get();
|
||||
$views_data = $this->viewsData->getAll();
|
||||
$this->assertSame($expected_views_data, $views_data);
|
||||
}
|
||||
|
||||
|
@ -271,7 +271,7 @@ class ViewsDataTest extends UnitTestCase {
|
|||
->method('set')
|
||||
->with("views_data:$random_table_name:en", array());
|
||||
|
||||
$views_data = $this->viewsData->get();
|
||||
$views_data = $this->viewsData->getAll();
|
||||
$this->assertSame($expected_views_data, $views_data);
|
||||
|
||||
// Request a specific table should be static cached.
|
||||
|
@ -288,7 +288,7 @@ class ViewsDataTest extends UnitTestCase {
|
|||
$this->viewsData->clear();
|
||||
|
||||
// Get the views data again.
|
||||
$this->viewsData->get();
|
||||
$this->viewsData->getAll();
|
||||
$this->viewsData->get($table_name);
|
||||
$this->viewsData->get($table_name_2);
|
||||
$this->viewsData->get($random_table_name);
|
||||
|
@ -312,10 +312,10 @@ class ViewsDataTest extends UnitTestCase {
|
|||
->with("views_data:en")
|
||||
->will($this->returnValue(FALSE));
|
||||
|
||||
$views_data = $this->viewsData->get();
|
||||
$views_data = $this->viewsData->getAll();
|
||||
$this->assertSame($expected_views_data, $views_data);
|
||||
|
||||
$views_data = $this->viewsData->get();
|
||||
$views_data = $this->viewsData->getAll();
|
||||
$this->assertSame($expected_views_data, $views_data);
|
||||
}
|
||||
|
||||
|
@ -349,7 +349,7 @@ class ViewsDataTest extends UnitTestCase {
|
|||
$this->assertSame($expected_views_data[$table_name], $views_data, 'Make sure fetching cached views data by table works as expected.');
|
||||
|
||||
// Test that this data is present if all views data is returned.
|
||||
$views_data = $this->viewsData->get();
|
||||
$views_data = $this->viewsData->getAll();
|
||||
|
||||
$this->assertArrayHasKey($table_name, $views_data, 'Make sure the views_test_data info appears in the total views data.');
|
||||
$this->assertSame($expected_views_data[$table_name], $views_data[$table_name], 'Make sure the views_test_data has the expected values.');
|
||||
|
@ -568,7 +568,7 @@ class ViewsDataTest extends UnitTestCase {
|
|||
// Initialize the views data cache and repeat with no specified table. This
|
||||
// should only load the cache entry for all tables.
|
||||
for ($i = 0; $i < 5; $i++) {
|
||||
$views_data = $this->viewsData->get();
|
||||
$views_data = $this->viewsData->getAll();
|
||||
$this->assertSame($expected_views_data, $views_data);
|
||||
}
|
||||
}
|
||||
|
@ -595,7 +595,7 @@ class ViewsDataTest extends UnitTestCase {
|
|||
// Initialize the views data cache and repeat with no specified table. This
|
||||
// should only load the cache entry for all tables.
|
||||
for ($i = 0; $i < 5; $i++) {
|
||||
$views_data = $this->viewsData->get();
|
||||
$views_data = $this->viewsData->getAll();
|
||||
$this->assertSame($expected_views_data, $views_data);
|
||||
}
|
||||
}
|
||||
|
@ -638,4 +638,30 @@ class ViewsDataTest extends UnitTestCase {
|
|||
$this->assertSame($expected_views_data[$table_name_2], $this->viewsData->get($table_name_2));
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests that getting all data has same results as getting data with NULL
|
||||
* logic.
|
||||
*
|
||||
* @covers ::getAll
|
||||
*/
|
||||
public function testGetAllEqualsToGetNull() {
|
||||
$expected_views_data = $this->viewsDataWithProvider();
|
||||
$this->setupMockedModuleHandler();
|
||||
|
||||
// Setup a warm cache backend for a single table.
|
||||
$this->cacheBackend->expects($this->once())
|
||||
->method('get')
|
||||
->with("views_data:en");
|
||||
$this->cacheBackend->expects($this->once())
|
||||
->method('set')
|
||||
->with('views_data:en', $expected_views_data);
|
||||
|
||||
// Initialize the views data cache and repeat with no specified table. This
|
||||
// should only load the cache entry for all tables.
|
||||
for ($i = 0; $i < 5; $i++) {
|
||||
$this->assertSame($expected_views_data, $this->viewsData->getAll());
|
||||
$this->assertSame($expected_views_data, $this->viewsData->get());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -42,6 +42,7 @@ class ViewsHandlerManagerTest extends UnitTestCase {
|
|||
* {@inheritdoc}
|
||||
*/
|
||||
protected function setUp() {
|
||||
parent::setUp();
|
||||
$this->viewsData = $this->getMockBuilder('Drupal\views\ViewsData')
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
name: Views test checkboxes theme
|
||||
type: theme
|
||||
description: Theme for testing Views rendering of checkboxes.
|
||||
version: VERSION
|
||||
core: 8.x
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Changes an exposed "type" filter from a multi-select to checkboxes.
|
||||
*/
|
||||
|
||||
use Drupal\Core\Form\FormStateInterface;
|
||||
|
||||
/**
|
||||
* Changes an exposed "type" filter from a multi-select to checkboxes.
|
||||
*/
|
||||
function views_test_checkboxes_theme_form_views_exposed_form_alter(&$form, FormStateInterface $form_state) {
|
||||
$form['type']['#type'] = 'checkboxes';
|
||||
}
|
Reference in a new issue