Update to drupal 8.0.0-rc1. For more information, see https://www.drupal.org/node/2582663

This commit is contained in:
Greg Anderson 2015-10-08 11:40:12 -07:00
parent eb34d130a8
commit f32e58e4b1
8476 changed files with 211648 additions and 170042 deletions

View file

@ -144,10 +144,10 @@ function node_access_test_add_field(NodeTypeInterface $type) {
/**
* Implements hook_node_access().
*/
function node_access_test_node_access(\Drupal\node\NodeInterface $node, $op, \Drupal\Core\Session\AccountInterface $account, $langcode) {
function node_access_test_node_access(\Drupal\node\NodeInterface $node, $op, \Drupal\Core\Session\AccountInterface $account) {
$secret_catalan = \Drupal::state()
->get('node_access_test_secret_catalan') ?: 0;
if ($secret_catalan && $langcode == 'ca') {
if ($secret_catalan && $node->language()->getId() == 'ca') {
// Make all Catalan content secret.
return AccessResult::forbidden()->setCacheMaxAge(0);
}

View file

@ -20,12 +20,12 @@ function node_test_node_view(array &$build, NodeInterface $node, EntityViewDispl
// Add RSS elements and namespaces when building the RSS feed.
$node->rss_elements[] = array(
'key' => 'testElement',
'value' => t('Value of testElement RSS element for node !nid.', array('!nid' => $node->id())),
'value' => t('Value of testElement RSS element for node @nid.', array('@nid' => $node->id())),
);
// Add content that should be displayed only in the RSS feed.
$build['extra_feed_content'] = array(
'#markup' => '<p>' . t('Extra data that should appear only in the RSS feed for node !nid.', array('!nid' => $node->id())) . '</p>',
'#markup' => '<p>' . t('Extra data that should appear only in the RSS feed for node @nid.', array('@nid' => $node->id())) . '</p>',
'#weight' => 10,
);
}
@ -33,7 +33,7 @@ function node_test_node_view(array &$build, NodeInterface $node, EntityViewDispl
if ($view_mode != 'rss') {
// Add content that should NOT be displayed in the RSS feed.
$build['extra_non_feed_content'] = array(
'#markup' => '<p>' . t('Extra data that should appear everywhere except the RSS feed for node !nid.', array('!nid' => $node->id())) . '</p>',
'#markup' => '<p>' . t('Extra data that should appear everywhere except the RSS feed for node @nid.', array('@nid' => $node->id())) . '</p>',
);
}
}
@ -41,7 +41,7 @@ function node_test_node_view(array &$build, NodeInterface $node, EntityViewDispl
/**
* Implements hook_ENTITY_TYPE_build_defaults_alter() for node entities.
*/
function node_test_node_build_defaults_alter(array &$build, NodeInterface &$node, $view_mode = 'full', $langcode = NULL) {
function node_test_node_build_defaults_alter(array &$build, NodeInterface &$node, $view_mode = 'full') {
if ($view_mode == 'rss') {
$node->rss_namespaces['xmlns:drupaltest'] = 'http://example.com/test-namespace';
}

View file

@ -38,10 +38,10 @@ display:
offset: false
offset_label: Offset
tags:
previous: ' previous'
next: 'next '
first: first'
last: 'last »'
previous: ' Previous'
next: 'Next '
first: First'
last: 'Last »'
quantity: 9
query:
type: views_query

View file

@ -0,0 +1,192 @@
langcode: en
status: true
dependencies:
module:
- node
- user
id: test_nid_argument
label: test_nid_argument
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: perm
options:
perm: 'access content'
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: none
options:
items_per_page: null
offset: 0
style:
type: default
row:
type: fields
fields:
nid:
id: nid
table: node
field: nid
relationship: none
group_type: group
admin_label: ''
label: ''
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: false
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: value
type: number_integer
settings:
thousand_separator: ''
prefix_suffix: true
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
entity_type: node
entity_field: nid
plugin_id: field
filters: { }
sorts: { }
title: test_nid_argument
header: { }
footer: { }
empty: { }
relationships: { }
arguments:
nid:
id: nid
table: node_field_data
field: nid
relationship: none
group_type: group
admin_label: ''
default_action: ignore
exception:
value: all
title_enable: false
title: All
title_enable: true
title: '{{ arguments.nid }}'
default_argument_type: fixed
default_argument_options:
argument: ''
default_argument_skip_url: false
summary_options:
base_path: ''
count: true
items_per_page: 25
override: false
summary:
sort_order: asc
number_of_records: 0
format: default_summary
specify_validation: false
validate:
type: none
fail: 'not found'
validate_options: { }
break_phrase: false
not: false
entity_type: node
entity_field: nid
plugin_id: node_nid
display_extenders: { }
cache_metadata:
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- url
- 'user.node_grants:view'
- user.permissions
cacheable: false
page_1:
display_plugin: page
id: page_1
display_title: Page
position: 1
display_options:
display_extenders: { }
path: test-nid-argument
cache_metadata:
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- url
- 'user.node_grants:view'
- user.permissions
cacheable: false

View file

@ -63,10 +63,10 @@ display:
offset: false
offset_label: Offset
tags:
previous: ' previous'
next: 'next '
first: first'
last: 'last »'
previous: ' Previous'
next: 'Next '
first: First'
last: 'Last »'
quantity: 9
style:
type: default

View file

@ -60,10 +60,10 @@ display:
offset: false
offset_label: Offset
tags:
previous: ' previous'
next: 'next '
first: first'
last: 'last »'
previous: ' Previous'
next: 'Next '
first: First'
last: 'Last »'
quantity: 9
style:
type: default
@ -167,8 +167,8 @@ display:
value: all
title_enable: false
title: All
title_enable: false
title: ''
title_enable: true
title: '{{ arguments.type }}'
default_argument_type: fixed
default_argument_options:
argument: ''

View file

@ -0,0 +1,36 @@
<?php
/**
* @file
* Contains \Drupal\Tests\node\Kernel\Action\UnpublishByKeywordActionTest.
*/
namespace Drupal\Tests\node\Kernel\Action;
use Drupal\KernelTests\KernelTestBase;
use Drupal\system\Entity\Action;
/**
* @group node
*/
class UnpublishByKeywordActionTest extends KernelTestBase {
/**
* {@inheritdoc}
*/
public static $modules = ['action', 'node', 'system', 'user'];
/**
* Tests creating an action using the node_unpublish_by_keyword_action plugin.
*
* @see https://www.drupal.org/node/2578519
*/
public function testUnpublishByKeywordAction() {
Action::create([
'id' => 'foo',
'label' => 'Foobaz',
'plugin' => 'node_unpublish_by_keyword_action',
])->save();
}
}