Update to Drupal 8.1.0. For more information, see https://www.drupal.org/drupal-8.1.0-release-notes
This commit is contained in:
parent
b11a755ba8
commit
c0a0d5a94c
6920 changed files with 64395 additions and 57312 deletions
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\node\NodeViewsData.
|
||||
*/
|
||||
|
||||
namespace Drupal\node;
|
||||
|
||||
use Drupal\views\EntityViewsData;
|
||||
|
|
@ -37,43 +32,43 @@ class NodeViewsData extends EntityViewsData {
|
|||
|
||||
$data['node_field_data']['type']['argument']['id'] = 'node_type';
|
||||
|
||||
$data['node_field_data']['langcode']['help'] = t('The language of the content or translation.');
|
||||
$data['node_field_data']['langcode']['help'] = $this->t('The language of the content or translation.');
|
||||
|
||||
$data['node_field_data']['status']['filter']['label'] = t('Published status');
|
||||
$data['node_field_data']['status']['filter']['label'] = $this->t('Published status');
|
||||
$data['node_field_data']['status']['filter']['type'] = 'yes-no';
|
||||
// Use status = 1 instead of status <> 0 in WHERE statement.
|
||||
$data['node_field_data']['status']['filter']['use_equal'] = TRUE;
|
||||
|
||||
$data['node_field_data']['status_extra'] = array(
|
||||
'title' => t('Published status or admin user'),
|
||||
'help' => t('Filters out unpublished content if the current user cannot view it.'),
|
||||
'title' => $this->t('Published status or admin user'),
|
||||
'help' => $this->t('Filters out unpublished content if the current user cannot view it.'),
|
||||
'filter' => array(
|
||||
'field' => 'status',
|
||||
'id' => 'node_status',
|
||||
'label' => t('Published status or admin user'),
|
||||
'label' => $this->t('Published status or admin user'),
|
||||
),
|
||||
);
|
||||
|
||||
$data['node_field_data']['promote']['help'] = t('A boolean indicating whether the node is visible on the front page.');
|
||||
$data['node_field_data']['promote']['filter']['label'] = t('Promoted to front page status');
|
||||
$data['node_field_data']['promote']['help'] = $this->t('A boolean indicating whether the node is visible on the front page.');
|
||||
$data['node_field_data']['promote']['filter']['label'] = $this->t('Promoted to front page status');
|
||||
$data['node_field_data']['promote']['filter']['type'] = 'yes-no';
|
||||
|
||||
$data['node_field_data']['sticky']['help'] = t('A boolean indicating whether the node should sort to the top of content lists.');
|
||||
$data['node_field_data']['sticky']['filter']['label'] = t('Sticky status');
|
||||
$data['node_field_data']['sticky']['help'] = $this->t('A boolean indicating whether the node should sort to the top of content lists.');
|
||||
$data['node_field_data']['sticky']['filter']['label'] = $this->t('Sticky status');
|
||||
$data['node_field_data']['sticky']['filter']['type'] = 'yes-no';
|
||||
$data['node_field_data']['sticky']['sort']['help'] = t('Whether or not the content is sticky. To list sticky content first, set this to descending.');
|
||||
$data['node_field_data']['sticky']['sort']['help'] = $this->t('Whether or not the content is sticky. To list sticky content first, set this to descending.');
|
||||
|
||||
$data['node']['path'] = array(
|
||||
'field' => array(
|
||||
'title' => t('Path'),
|
||||
'help' => t('The aliased path to this content.'),
|
||||
'title' => $this->t('Path'),
|
||||
'help' => $this->t('The aliased path to this content.'),
|
||||
'id' => 'node_path',
|
||||
),
|
||||
);
|
||||
|
||||
$data['node']['node_bulk_form'] = array(
|
||||
'title' => t('Node operations bulk form'),
|
||||
'help' => t('Add a form element that lets you run operations on multiple nodes.'),
|
||||
'title' => $this->t('Node operations bulk form'),
|
||||
'help' => $this->t('Add a form element that lets you run operations on multiple nodes.'),
|
||||
'field' => array(
|
||||
'id' => 'node_bulk_form',
|
||||
),
|
||||
|
|
@ -84,8 +79,8 @@ class NodeViewsData extends EntityViewsData {
|
|||
// @todo Add similar support to any date field
|
||||
// @see https://www.drupal.org/node/2337507
|
||||
$data['node_field_data']['created_fulldate'] = array(
|
||||
'title' => t('Created date'),
|
||||
'help' => t('Date in the form of CCYYMMDD.'),
|
||||
'title' => $this->t('Created date'),
|
||||
'help' => $this->t('Date in the form of CCYYMMDD.'),
|
||||
'argument' => array(
|
||||
'field' => 'created',
|
||||
'id' => 'date_fulldate',
|
||||
|
|
@ -93,8 +88,8 @@ class NodeViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['node_field_data']['created_year_month'] = array(
|
||||
'title' => t('Created year + month'),
|
||||
'help' => t('Date in the form of YYYYMM.'),
|
||||
'title' => $this->t('Created year + month'),
|
||||
'help' => $this->t('Date in the form of YYYYMM.'),
|
||||
'argument' => array(
|
||||
'field' => 'created',
|
||||
'id' => 'date_year_month',
|
||||
|
|
@ -102,8 +97,8 @@ class NodeViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['node_field_data']['created_year'] = array(
|
||||
'title' => t('Created year'),
|
||||
'help' => t('Date in the form of YYYY.'),
|
||||
'title' => $this->t('Created year'),
|
||||
'help' => $this->t('Date in the form of YYYY.'),
|
||||
'argument' => array(
|
||||
'field' => 'created',
|
||||
'id' => 'date_year',
|
||||
|
|
@ -111,8 +106,8 @@ class NodeViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['node_field_data']['created_month'] = array(
|
||||
'title' => t('Created month'),
|
||||
'help' => t('Date in the form of MM (01 - 12).'),
|
||||
'title' => $this->t('Created month'),
|
||||
'help' => $this->t('Date in the form of MM (01 - 12).'),
|
||||
'argument' => array(
|
||||
'field' => 'created',
|
||||
'id' => 'date_month',
|
||||
|
|
@ -120,8 +115,8 @@ class NodeViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['node_field_data']['created_day'] = array(
|
||||
'title' => t('Created day'),
|
||||
'help' => t('Date in the form of DD (01 - 31).'),
|
||||
'title' => $this->t('Created day'),
|
||||
'help' => $this->t('Date in the form of DD (01 - 31).'),
|
||||
'argument' => array(
|
||||
'field' => 'created',
|
||||
'id' => 'date_day',
|
||||
|
|
@ -129,8 +124,8 @@ class NodeViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['node_field_data']['created_week'] = array(
|
||||
'title' => t('Created week'),
|
||||
'help' => t('Date in the form of WW (01 - 53).'),
|
||||
'title' => $this->t('Created week'),
|
||||
'help' => $this->t('Date in the form of WW (01 - 53).'),
|
||||
'argument' => array(
|
||||
'field' => 'created',
|
||||
'id' => 'date_week',
|
||||
|
|
@ -138,8 +133,8 @@ class NodeViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['node_field_data']['changed_fulldate'] = array(
|
||||
'title' => t('Updated date'),
|
||||
'help' => t('Date in the form of CCYYMMDD.'),
|
||||
'title' => $this->t('Updated date'),
|
||||
'help' => $this->t('Date in the form of CCYYMMDD.'),
|
||||
'argument' => array(
|
||||
'field' => 'changed',
|
||||
'id' => 'date_fulldate',
|
||||
|
|
@ -147,8 +142,8 @@ class NodeViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['node_field_data']['changed_year_month'] = array(
|
||||
'title' => t('Updated year + month'),
|
||||
'help' => t('Date in the form of YYYYMM.'),
|
||||
'title' => $this->t('Updated year + month'),
|
||||
'help' => $this->t('Date in the form of YYYYMM.'),
|
||||
'argument' => array(
|
||||
'field' => 'changed',
|
||||
'id' => 'date_year_month',
|
||||
|
|
@ -156,8 +151,8 @@ class NodeViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['node_field_data']['changed_year'] = array(
|
||||
'title' => t('Updated year'),
|
||||
'help' => t('Date in the form of YYYY.'),
|
||||
'title' => $this->t('Updated year'),
|
||||
'help' => $this->t('Date in the form of YYYY.'),
|
||||
'argument' => array(
|
||||
'field' => 'changed',
|
||||
'id' => 'date_year',
|
||||
|
|
@ -165,8 +160,8 @@ class NodeViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['node_field_data']['changed_month'] = array(
|
||||
'title' => t('Updated month'),
|
||||
'help' => t('Date in the form of MM (01 - 12).'),
|
||||
'title' => $this->t('Updated month'),
|
||||
'help' => $this->t('Date in the form of MM (01 - 12).'),
|
||||
'argument' => array(
|
||||
'field' => 'changed',
|
||||
'id' => 'date_month',
|
||||
|
|
@ -174,8 +169,8 @@ class NodeViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['node_field_data']['changed_day'] = array(
|
||||
'title' => t('Updated day'),
|
||||
'help' => t('Date in the form of DD (01 - 31).'),
|
||||
'title' => $this->t('Updated day'),
|
||||
'help' => $this->t('Date in the form of DD (01 - 31).'),
|
||||
'argument' => array(
|
||||
'field' => 'changed',
|
||||
'id' => 'date_day',
|
||||
|
|
@ -183,30 +178,30 @@ class NodeViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['node_field_data']['changed_week'] = array(
|
||||
'title' => t('Updated week'),
|
||||
'help' => t('Date in the form of WW (01 - 53).'),
|
||||
'title' => $this->t('Updated week'),
|
||||
'help' => $this->t('Date in the form of WW (01 - 53).'),
|
||||
'argument' => array(
|
||||
'field' => 'changed',
|
||||
'id' => 'date_week',
|
||||
),
|
||||
);
|
||||
|
||||
$data['node_field_data']['uid']['help'] = t('The user authoring the content. If you need more fields than the uid add the content: author relationship');
|
||||
$data['node_field_data']['uid']['help'] = $this->t('The user authoring the content. If you need more fields than the uid add the content: author relationship');
|
||||
$data['node_field_data']['uid']['filter']['id'] = 'user_name';
|
||||
$data['node_field_data']['uid']['relationship']['title'] = t('Content author');
|
||||
$data['node_field_data']['uid']['relationship']['help'] = t('Relate content to the user who created it.');
|
||||
$data['node_field_data']['uid']['relationship']['label'] = t('author');
|
||||
$data['node_field_data']['uid']['relationship']['title'] = $this->t('Content author');
|
||||
$data['node_field_data']['uid']['relationship']['help'] = $this->t('Relate content to the user who created it.');
|
||||
$data['node_field_data']['uid']['relationship']['label'] = $this->t('author');
|
||||
|
||||
$data['node']['node_listing_empty'] = array(
|
||||
'title' => t('Empty Node Frontpage behavior'),
|
||||
'help' => t('Provides a link to the node add overview page.'),
|
||||
'title' => $this->t('Empty Node Frontpage behavior'),
|
||||
'help' => $this->t('Provides a link to the node add overview page.'),
|
||||
'area' => array(
|
||||
'id' => 'node_listing_empty',
|
||||
),
|
||||
);
|
||||
|
||||
$data['node_field_data']['uid_revision']['title'] = t('User has a revision');
|
||||
$data['node_field_data']['uid_revision']['help'] = t('All nodes where a certain user has a revision');
|
||||
$data['node_field_data']['uid_revision']['title'] = $this->t('User has a revision');
|
||||
$data['node_field_data']['uid_revision']['help'] = $this->t('All nodes where a certain user has a revision');
|
||||
$data['node_field_data']['uid_revision']['real field'] = 'nid';
|
||||
$data['node_field_data']['uid_revision']['filter']['id'] = 'node_uid_revision';
|
||||
$data['node_field_data']['uid_revision']['argument']['id'] = 'node_uid_revision';
|
||||
|
|
@ -214,7 +209,7 @@ class NodeViewsData extends EntityViewsData {
|
|||
$data['node_field_revision']['table']['wizard_id'] = 'node_revision';
|
||||
|
||||
// Advertise this table as a possible base table.
|
||||
$data['node_field_revision']['table']['base']['help'] = t('Content revision is a history of changes to content.');
|
||||
$data['node_field_revision']['table']['base']['help'] = $this->t('Content revision is a history of changes to content.');
|
||||
$data['node_field_revision']['table']['base']['defaults']['title'] = 'title';
|
||||
|
||||
$data['node_field_revision']['nid']['argument'] = [
|
||||
|
|
@ -227,8 +222,8 @@ class NodeViewsData extends EntityViewsData {
|
|||
$data['node_field_revision']['nid']['relationship']['id'] = 'standard';
|
||||
$data['node_field_revision']['nid']['relationship']['base'] = 'node_field_data';
|
||||
$data['node_field_revision']['nid']['relationship']['base field'] = 'nid';
|
||||
$data['node_field_revision']['nid']['relationship']['title'] = t('Content');
|
||||
$data['node_field_revision']['nid']['relationship']['label'] = t('Get the actual content from a content revision.');
|
||||
$data['node_field_revision']['nid']['relationship']['title'] = $this->t('Content');
|
||||
$data['node_field_revision']['nid']['relationship']['label'] = $this->t('Get the actual content from a content revision.');
|
||||
|
||||
$data['node_field_revision']['vid'] = array(
|
||||
'argument' => array(
|
||||
|
|
@ -239,35 +234,35 @@ class NodeViewsData extends EntityViewsData {
|
|||
'id' => 'standard',
|
||||
'base' => 'node_field_data',
|
||||
'base field' => 'vid',
|
||||
'title' => t('Content'),
|
||||
'label' => t('Get the actual content from a content revision.'),
|
||||
'title' => $this->t('Content'),
|
||||
'label' => $this->t('Get the actual content from a content revision.'),
|
||||
),
|
||||
) + $data['node_field_revision']['vid'];
|
||||
|
||||
$data['node_field_revision']['langcode']['help'] = t('The language the original content is in.');
|
||||
$data['node_field_revision']['langcode']['help'] = $this->t('The language the original content is in.');
|
||||
|
||||
$data['node_revision']['revision_uid']['help'] = t('Relate a content revision to the user who created the revision.');
|
||||
$data['node_revision']['revision_uid']['relationship']['label'] = t('revision user');
|
||||
$data['node_revision']['revision_uid']['help'] = $this->t('Relate a content revision to the user who created the revision.');
|
||||
$data['node_revision']['revision_uid']['relationship']['label'] = $this->t('revision user');
|
||||
|
||||
$data['node_field_revision']['table']['wizard_id'] = 'node_field_revision';
|
||||
|
||||
$data['node_field_revision']['table']['join']['node_field_data']['left_field'] = 'vid';
|
||||
$data['node_field_revision']['table']['join']['node_field_data']['field'] = 'vid';
|
||||
|
||||
$data['node_field_revision']['status']['filter']['label'] = t('Published');
|
||||
$data['node_field_revision']['status']['filter']['label'] = $this->t('Published');
|
||||
$data['node_field_revision']['status']['filter']['type'] = 'yes-no';
|
||||
$data['node_field_revision']['status']['filter']['use_equal'] = TRUE;
|
||||
|
||||
$data['node_field_revision']['promote']['help'] = t('A boolean indicating whether the node is visible on the front page.');
|
||||
$data['node_field_revision']['promote']['help'] = $this->t('A boolean indicating whether the node is visible on the front page.');
|
||||
|
||||
$data['node_field_revision']['sticky']['help'] = t('A boolean indicating whether the node should sort to the top of content lists.');
|
||||
$data['node_field_revision']['sticky']['help'] = $this->t('A boolean indicating whether the node should sort to the top of content lists.');
|
||||
|
||||
$data['node_field_revision']['langcode']['help'] = t('The language of the content or translation.');
|
||||
$data['node_field_revision']['langcode']['help'] = $this->t('The language of the content or translation.');
|
||||
|
||||
$data['node_field_revision']['link_to_revision'] = array(
|
||||
'field' => array(
|
||||
'title' => t('Link to revision'),
|
||||
'help' => t('Provide a simple link to the revision.'),
|
||||
'title' => $this->t('Link to revision'),
|
||||
'help' => $this->t('Provide a simple link to the revision.'),
|
||||
'id' => 'node_revision_link',
|
||||
'click sortable' => FALSE,
|
||||
),
|
||||
|
|
@ -275,8 +270,8 @@ class NodeViewsData extends EntityViewsData {
|
|||
|
||||
$data['node_field_revision']['revert_revision'] = array(
|
||||
'field' => array(
|
||||
'title' => t('Link to revert revision'),
|
||||
'help' => t('Provide a simple link to revert to the revision.'),
|
||||
'title' => $this->t('Link to revert revision'),
|
||||
'help' => $this->t('Provide a simple link to revert to the revision.'),
|
||||
'id' => 'node_revision_link_revert',
|
||||
'click sortable' => FALSE,
|
||||
),
|
||||
|
|
@ -284,8 +279,8 @@ class NodeViewsData extends EntityViewsData {
|
|||
|
||||
$data['node_field_revision']['delete_revision'] = array(
|
||||
'field' => array(
|
||||
'title' => t('Link to delete revision'),
|
||||
'help' => t('Provide a simple link to delete the content revision.'),
|
||||
'title' => $this->t('Link to delete revision'),
|
||||
'help' => $this->t('Provide a simple link to delete the content revision.'),
|
||||
'id' => 'node_revision_link_delete',
|
||||
'click sortable' => FALSE,
|
||||
),
|
||||
|
|
@ -293,7 +288,7 @@ class NodeViewsData extends EntityViewsData {
|
|||
|
||||
// Define the base group of this table. Fields that don't have a group defined
|
||||
// will go into this field by default.
|
||||
$data['node_access']['table']['group'] = t('Content access');
|
||||
$data['node_access']['table']['group'] = $this->t('Content access');
|
||||
|
||||
// For other base tables, explain how we join.
|
||||
$data['node_access']['table']['join'] = array(
|
||||
|
|
@ -303,11 +298,11 @@ class NodeViewsData extends EntityViewsData {
|
|||
),
|
||||
);
|
||||
$data['node_access']['nid'] = array(
|
||||
'title' => t('Access'),
|
||||
'help' => t('Filter by access.'),
|
||||
'title' => $this->t('Access'),
|
||||
'help' => $this->t('Filter by access.'),
|
||||
'filter' => array(
|
||||
'id' => 'node_access',
|
||||
'help' => t('Filter for content by view access. <strong>Not necessary if you are using node as your base table.</strong>'),
|
||||
'help' => $this->t('Filter for content by view access. <strong>Not necessary if you are using node as your base table.</strong>'),
|
||||
),
|
||||
);
|
||||
|
||||
|
|
@ -324,7 +319,7 @@ class NodeViewsData extends EntityViewsData {
|
|||
}
|
||||
|
||||
if ($enabled) {
|
||||
$data['node_search_index']['table']['group'] = t('Search');
|
||||
$data['node_search_index']['table']['group'] = $this->t('Search');
|
||||
|
||||
// Automatically join to the node table (or actually, node_field_data).
|
||||
// Use a Views table alias to allow other modules to use this table too,
|
||||
|
|
@ -357,8 +352,8 @@ class NodeViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['node_search_index']['score'] = array(
|
||||
'title' => t('Score'),
|
||||
'help' => t('The score of the search item. This will not be used if the search filter is not also present.'),
|
||||
'title' => $this->t('Score'),
|
||||
'help' => $this->t('The score of the search item. This will not be used if the search filter is not also present.'),
|
||||
'field' => array(
|
||||
'id' => 'search_score',
|
||||
'float' => TRUE,
|
||||
|
|
@ -371,8 +366,8 @@ class NodeViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['node_search_index']['keys'] = array(
|
||||
'title' => t('Search Keywords'),
|
||||
'help' => t('The keywords to search for.'),
|
||||
'title' => $this->t('Search Keywords'),
|
||||
'help' => $this->t('The keywords to search for.'),
|
||||
'filter' => array(
|
||||
'id' => 'search_keywords',
|
||||
'no group by' => TRUE,
|
||||
|
|
|
|||
Reference in a new issue