Issue #2667346 by mohit_aghera: EntityViewsData extending classes should use $this->t() but many use t()
parent
8d7c0ffefd
commit
55e3b42546
|
@ -29,8 +29,8 @@ class BlockContentViewsData extends EntityViewsData {
|
|||
$data['block_content_field_data']['type']['field']['id'] = 'field';
|
||||
|
||||
$data['block_content']['block_content_listing_empty'] = array(
|
||||
'title' => t('Empty block library behavior'),
|
||||
'help' => t('Provides a link to add a new block.'),
|
||||
'title' => $this->t('Empty block library behavior'),
|
||||
'help' => $this->t('Provides a link to add a new block.'),
|
||||
'area' => array(
|
||||
'id' => 'block_content_listing_empty',
|
||||
),
|
||||
|
|
|
@ -20,32 +20,32 @@ class CommentViewsData extends EntityViewsData {
|
|||
public function getViewsData() {
|
||||
$data = parent::getViewsData();
|
||||
|
||||
$data['comment_field_data']['table']['base']['help'] = t('Comments are responses to content.');
|
||||
$data['comment_field_data']['table']['base']['help'] = $this->t('Comments are responses to content.');
|
||||
$data['comment_field_data']['table']['base']['access query tag'] = 'comment_access';
|
||||
|
||||
$data['comment_field_data']['table']['wizard_id'] = 'comment';
|
||||
|
||||
$data['comment_field_data']['subject']['title'] = t('Title');
|
||||
$data['comment_field_data']['subject']['help'] = t('The title of the comment.');
|
||||
$data['comment_field_data']['subject']['title'] = $this->t('Title');
|
||||
$data['comment_field_data']['subject']['help'] = $this->t('The title of the comment.');
|
||||
|
||||
$data['comment_field_data']['name']['title'] = t('Author');
|
||||
$data['comment_field_data']['name']['help'] = t("The name of the comment's author. Can be rendered as a link to the author's homepage.");
|
||||
$data['comment_field_data']['name']['title'] = $this->t('Author');
|
||||
$data['comment_field_data']['name']['help'] = $this->t("The name of the comment's author. Can be rendered as a link to the author's homepage.");
|
||||
$data['comment_field_data']['name']['field']['default_formatter'] = 'comment_username';
|
||||
|
||||
$data['comment_field_data']['homepage']['title'] = t("Author's website");
|
||||
$data['comment_field_data']['homepage']['help'] = t("The website address of the comment's author. Can be rendered as a link. Will be empty if the author is a registered user.");
|
||||
$data['comment_field_data']['homepage']['title'] = $this->t("Author's website");
|
||||
$data['comment_field_data']['homepage']['help'] = $this->t("The website address of the comment's author. Can be rendered as a link. Will be empty if the author is a registered user.");
|
||||
|
||||
$data['comment_field_data']['mail']['help'] = t('Email of user that posted the comment. Will be empty if the author is a registered user.');
|
||||
$data['comment_field_data']['mail']['help'] = $this->t('Email of user that posted the comment. Will be empty if the author is a registered user.');
|
||||
|
||||
$data['comment_field_data']['created']['title'] = t('Post date');
|
||||
$data['comment_field_data']['created']['help'] = t('Date and time of when the comment was created.');
|
||||
$data['comment_field_data']['created']['title'] = $this->t('Post date');
|
||||
$data['comment_field_data']['created']['help'] = $this->t('Date and time of when the comment was created.');
|
||||
|
||||
$data['comment_field_data']['changed']['title'] = t('Updated date');
|
||||
$data['comment_field_data']['changed']['help'] = t('Date and time of when the comment was last updated.');
|
||||
$data['comment_field_data']['changed']['title'] = $this->t('Updated date');
|
||||
$data['comment_field_data']['changed']['help'] = $this->t('Date and time of when the comment was last updated.');
|
||||
|
||||
$data['comment_field_data']['changed_fulldata'] = 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' => 'changed',
|
||||
'id' => 'date_fulldate',
|
||||
|
@ -53,8 +53,8 @@ class CommentViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['comment_field_data']['changed_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' => 'changed',
|
||||
'id' => 'date_year_month',
|
||||
|
@ -62,8 +62,8 @@ class CommentViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['comment_field_data']['changed_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' => 'changed',
|
||||
'id' => 'date_year',
|
||||
|
@ -71,8 +71,8 @@ class CommentViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['comment_field_data']['changed_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' => 'changed',
|
||||
'id' => 'date_month',
|
||||
|
@ -80,8 +80,8 @@ class CommentViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['comment_field_data']['changed_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' => 'changed',
|
||||
'id' => 'date_day',
|
||||
|
@ -89,43 +89,43 @@ class CommentViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['comment_field_data']['changed_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' => 'changed',
|
||||
'id' => 'date_week',
|
||||
),
|
||||
);
|
||||
|
||||
$data['comment_field_data']['status']['title'] = t('Approved status');
|
||||
$data['comment_field_data']['status']['help'] = t('Whether the comment is approved (or still in the moderation queue).');
|
||||
$data['comment_field_data']['status']['filter']['label'] = t('Approved comment status');
|
||||
$data['comment_field_data']['status']['title'] = $this->t('Approved status');
|
||||
$data['comment_field_data']['status']['help'] = $this->t('Whether the comment is approved (or still in the moderation queue).');
|
||||
$data['comment_field_data']['status']['filter']['label'] = $this->t('Approved comment status');
|
||||
$data['comment_field_data']['status']['filter']['type'] = 'yes-no';
|
||||
|
||||
$data['comment']['approve_comment'] = array(
|
||||
'field' => array(
|
||||
'title' => t('Link to approve comment'),
|
||||
'help' => t('Provide a simple link to approve the comment.'),
|
||||
'title' => $this->t('Link to approve comment'),
|
||||
'help' => $this->t('Provide a simple link to approve the comment.'),
|
||||
'id' => 'comment_link_approve',
|
||||
),
|
||||
);
|
||||
|
||||
$data['comment']['replyto_comment'] = array(
|
||||
'field' => array(
|
||||
'title' => t('Link to reply-to comment'),
|
||||
'help' => t('Provide a simple link to reply to the comment.'),
|
||||
'title' => $this->t('Link to reply-to comment'),
|
||||
'help' => $this->t('Provide a simple link to reply to the comment.'),
|
||||
'id' => 'comment_link_reply',
|
||||
),
|
||||
);
|
||||
|
||||
$data['comment_field_data']['thread']['field'] = array(
|
||||
'title' => t('Depth'),
|
||||
'help' => t('Display the depth of the comment if it is threaded.'),
|
||||
'title' => $this->t('Depth'),
|
||||
'help' => $this->t('Display the depth of the comment if it is threaded.'),
|
||||
'id' => 'comment_depth',
|
||||
);
|
||||
$data['comment_field_data']['thread']['sort'] = array(
|
||||
'title' => t('Thread'),
|
||||
'help' => t('Sort by the threaded order. This will keep child comments together with their parents.'),
|
||||
'title' => $this->t('Thread'),
|
||||
'help' => $this->t('Sort by the threaded order. This will keep child comments together with their parents.'),
|
||||
'id' => 'comment_thread',
|
||||
);
|
||||
unset($data['comment_field_data']['thread']['filter']);
|
||||
|
@ -142,7 +142,7 @@ class CommentViewsData extends EntityViewsData {
|
|||
$data['comment_field_data'][$type] = array(
|
||||
'relationship' => array(
|
||||
'title' => $entity_type->getLabel(),
|
||||
'help' => t('The @entity_type to which the comment is a reply to.', array('@entity_type' => $entity_type->getLabel())),
|
||||
'help' => $this->t('The @entity_type to which the comment is a reply to.', array('@entity_type' => $entity_type->getLabel())),
|
||||
'base' => $entity_type->getDataTable() ?: $entity_type->getBaseTable(),
|
||||
'base field' => $entity_type->getKey('id'),
|
||||
'relationship field' => 'entity_id',
|
||||
|
@ -160,20 +160,20 @@ class CommentViewsData extends EntityViewsData {
|
|||
}
|
||||
}
|
||||
|
||||
$data['comment_field_data']['uid']['title'] = t('Author uid');
|
||||
$data['comment_field_data']['uid']['help'] = t('If you need more fields than the uid add the comment: author relationship');
|
||||
$data['comment_field_data']['uid']['relationship']['title'] = t('Author');
|
||||
$data['comment_field_data']['uid']['relationship']['help'] = t("The User ID of the comment's author.");
|
||||
$data['comment_field_data']['uid']['relationship']['label'] = t('author');
|
||||
$data['comment_field_data']['uid']['title'] = $this->t('Author uid');
|
||||
$data['comment_field_data']['uid']['help'] = $this->t('If you need more fields than the uid add the comment: author relationship');
|
||||
$data['comment_field_data']['uid']['relationship']['title'] = $this->t('Author');
|
||||
$data['comment_field_data']['uid']['relationship']['help'] = $this->t("The User ID of the comment's author.");
|
||||
$data['comment_field_data']['uid']['relationship']['label'] = $this->t('author');
|
||||
|
||||
$data['comment_field_data']['pid']['title'] = t('Parent CID');
|
||||
$data['comment_field_data']['pid']['relationship']['title'] = t('Parent comment');
|
||||
$data['comment_field_data']['pid']['relationship']['help'] = t('The parent comment');
|
||||
$data['comment_field_data']['pid']['relationship']['label'] = t('parent');
|
||||
$data['comment_field_data']['pid']['title'] = $this->t('Parent CID');
|
||||
$data['comment_field_data']['pid']['relationship']['title'] = $this->t('Parent comment');
|
||||
$data['comment_field_data']['pid']['relationship']['help'] = $this->t('The parent comment');
|
||||
$data['comment_field_data']['pid']['relationship']['label'] = $this->t('parent');
|
||||
|
||||
// Define the base group of this table. Fields that don't have a group defined
|
||||
// will go into this field by default.
|
||||
$data['comment_entity_statistics']['table']['group'] = t('Comment Statistics');
|
||||
$data['comment_entity_statistics']['table']['group'] = $this->t('Comment Statistics');
|
||||
|
||||
// Provide a relationship for each entity type except comment.
|
||||
foreach ($entities_types as $type => $entity_type) {
|
||||
|
@ -202,8 +202,8 @@ class CommentViewsData extends EntityViewsData {
|
|||
}
|
||||
|
||||
$data['comment_entity_statistics']['last_comment_timestamp'] = array(
|
||||
'title' => t('Last comment time'),
|
||||
'help' => t('Date and time of when the last comment was posted.'),
|
||||
'title' => $this->t('Last comment time'),
|
||||
'help' => $this->t('Date and time of when the last comment was posted.'),
|
||||
'field' => array(
|
||||
'id' => 'comment_last_timestamp',
|
||||
),
|
||||
|
@ -216,8 +216,8 @@ class CommentViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['comment_entity_statistics']['last_comment_name'] = array(
|
||||
'title' => t("Last comment author"),
|
||||
'help' => t('The name of the author of the last posted comment.'),
|
||||
'title' => $this->t("Last comment author"),
|
||||
'help' => $this->t('The name of the author of the last posted comment.'),
|
||||
'field' => array(
|
||||
'id' => 'comment_ces_last_comment_name',
|
||||
'no group by' => TRUE,
|
||||
|
@ -229,8 +229,8 @@ class CommentViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['comment_entity_statistics']['comment_count'] = array(
|
||||
'title' => t('Comment count'),
|
||||
'help' => t('The number of comments an entity has.'),
|
||||
'title' => $this->t('Comment count'),
|
||||
'help' => $this->t('The number of comments an entity has.'),
|
||||
'field' => array(
|
||||
'id' => 'numeric',
|
||||
),
|
||||
|
@ -246,8 +246,8 @@ class CommentViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['comment_entity_statistics']['last_updated'] = array(
|
||||
'title' => t('Updated/commented date'),
|
||||
'help' => t('The most recent of last comment posted or entity updated time.'),
|
||||
'title' => $this->t('Updated/commented date'),
|
||||
'help' => $this->t('The most recent of last comment posted or entity updated time.'),
|
||||
'field' => array(
|
||||
'id' => 'comment_ces_last_updated',
|
||||
'no group by' => TRUE,
|
||||
|
@ -262,28 +262,28 @@ class CommentViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['comment_entity_statistics']['cid'] = array(
|
||||
'title' => t('Last comment CID'),
|
||||
'help' => t('Display the last comment of an entity'),
|
||||
'title' => $this->t('Last comment CID'),
|
||||
'help' => $this->t('Display the last comment of an entity'),
|
||||
'relationship' => array(
|
||||
'title' => t('Last comment'),
|
||||
'help' => t('The last comment of an entity.'),
|
||||
'group' => t('Comment'),
|
||||
'title' => $this->t('Last comment'),
|
||||
'help' => $this->t('The last comment of an entity.'),
|
||||
'group' => $this->t('Comment'),
|
||||
'base' => 'comment',
|
||||
'base field' => 'cid',
|
||||
'id' => 'standard',
|
||||
'label' => t('Last Comment'),
|
||||
'label' => $this->t('Last Comment'),
|
||||
),
|
||||
);
|
||||
|
||||
$data['comment_entity_statistics']['last_comment_uid'] = array(
|
||||
'title' => t('Last comment uid'),
|
||||
'help' => t('The User ID of the author of the last comment of an entity.'),
|
||||
'title' => $this->t('Last comment uid'),
|
||||
'help' => $this->t('The User ID of the author of the last comment of an entity.'),
|
||||
'relationship' => array(
|
||||
'title' => t('Last comment author'),
|
||||
'title' => $this->t('Last comment author'),
|
||||
'base' => 'users',
|
||||
'base field' => 'uid',
|
||||
'id' => 'standard',
|
||||
'label' => t('Last comment author'),
|
||||
'label' => $this->t('Last comment author'),
|
||||
),
|
||||
'filter' => array(
|
||||
'id' => 'numeric',
|
||||
|
@ -297,8 +297,8 @@ class CommentViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['comment_entity_statistics']['entity_type'] = array(
|
||||
'title' => t('Entity type'),
|
||||
'help' => t('The entity type to which the comment is a reply to.'),
|
||||
'title' => $this->t('Entity type'),
|
||||
'help' => $this->t('The entity type to which the comment is a reply to.'),
|
||||
'field' => array(
|
||||
'id' => 'standard',
|
||||
),
|
||||
|
@ -313,8 +313,8 @@ class CommentViewsData extends EntityViewsData {
|
|||
),
|
||||
);
|
||||
$data['comment_entity_statistics']['field_name'] = array(
|
||||
'title' => t('Comment field name'),
|
||||
'help' => t('The field name from which the comment originated.'),
|
||||
'title' => $this->t('Comment field name'),
|
||||
'help' => $this->t('The field name from which the comment originated.'),
|
||||
'field' => array(
|
||||
'id' => 'standard',
|
||||
),
|
||||
|
|
|
@ -21,7 +21,7 @@ class FileViewsData extends EntityViewsData {
|
|||
$data = parent::getViewsData();
|
||||
|
||||
// @TODO There is no corresponding information in entity metadata.
|
||||
$data['file_managed']['table']['base']['help'] = t('Files maintained by Drupal and various modules.');
|
||||
$data['file_managed']['table']['base']['help'] = $this->t('Files maintained by Drupal and various modules.');
|
||||
$data['file_managed']['table']['base']['defaults']['field'] = 'filename';
|
||||
$data['file_managed']['table']['wizard_id'] = 'file_managed';
|
||||
|
||||
|
@ -32,13 +32,13 @@ class FileViewsData extends EntityViewsData {
|
|||
'numeric' => TRUE,
|
||||
);
|
||||
$data['file_managed']['fid']['relationship'] = array(
|
||||
'title' => t('File usage'),
|
||||
'help' => t('Relate file entities to their usage.'),
|
||||
'title' => $this->t('File usage'),
|
||||
'help' => $this->t('Relate file entities to their usage.'),
|
||||
'id' => 'standard',
|
||||
'base' => 'file_usage',
|
||||
'base field' => 'fid',
|
||||
'field' => 'fid',
|
||||
'label' => t('File usage'),
|
||||
'label' => $this->t('File usage'),
|
||||
);
|
||||
|
||||
$data['file_managed']['uri']['field']['default_formatter'] = 'file_uri';
|
||||
|
@ -46,8 +46,8 @@ class FileViewsData extends EntityViewsData {
|
|||
$data['file_managed']['filemime']['field']['default_formatter'] = 'file_filemime';
|
||||
|
||||
$data['file_managed']['extension'] = array(
|
||||
'title' => t('Extension'),
|
||||
'help' => t('The extension of the file.'),
|
||||
'title' => $this->t('Extension'),
|
||||
'help' => $this->t('The extension of the file.'),
|
||||
'real field' => 'filename',
|
||||
'field' => array(
|
||||
'entity_type' => 'file',
|
||||
|
@ -63,14 +63,14 @@ class FileViewsData extends EntityViewsData {
|
|||
$data['file_managed']['status']['field']['default_formatter_settings'] = [
|
||||
'format' => 'custom',
|
||||
'format_custom_false' => $this->t('Temporary'),
|
||||
'format_custom_true' => t('Permanent'),
|
||||
'format_custom_true' => $this->t('Permanent'),
|
||||
];
|
||||
$data['file_managed']['status']['filter']['id'] = 'file_status';
|
||||
|
||||
$data['file_managed']['uid']['relationship']['title'] = t('User who uploaded');
|
||||
$data['file_managed']['uid']['relationship']['label'] = t('User who uploaded');
|
||||
$data['file_managed']['uid']['relationship']['title'] = $this->t('User who uploaded');
|
||||
$data['file_managed']['uid']['relationship']['label'] = $this->t('User who uploaded');
|
||||
|
||||
$data['file_usage']['table']['group'] = t('File Usage');
|
||||
$data['file_usage']['table']['group'] = $this->t('File Usage');
|
||||
|
||||
// Provide field-type-things to several base tables; on the core files table
|
||||
// ("file_managed") so that we can create relationships from files to
|
||||
|
@ -119,15 +119,15 @@ class FileViewsData extends EntityViewsData {
|
|||
|
||||
// Describes relationships between files and nodes.
|
||||
$data['file_usage']['file_to_node'] = array(
|
||||
'title' => t('Content'),
|
||||
'help' => t('Content that is associated with this file, usually because this file is in a field on the content.'),
|
||||
'title' => $this->t('Content'),
|
||||
'help' => $this->t('Content that is associated with this file, usually because this file is in a field on the content.'),
|
||||
// Only provide this field/relationship/etc.,
|
||||
// when the 'file_managed' base table is present.
|
||||
'skip base' => array('node_field_data', 'node_field_revision', 'users_field_data', 'comment_field_data', 'taxonomy_term_field_data'),
|
||||
'real field' => 'id',
|
||||
'relationship' => array(
|
||||
'title' => t('Content'),
|
||||
'label' => t('Content'),
|
||||
'title' => $this->t('Content'),
|
||||
'label' => $this->t('Content'),
|
||||
'base' => 'node_field_data',
|
||||
'base field' => 'nid',
|
||||
'relationship field' => 'id',
|
||||
|
@ -135,15 +135,15 @@ class FileViewsData extends EntityViewsData {
|
|||
),
|
||||
);
|
||||
$data['file_usage']['node_to_file'] = array(
|
||||
'title' => t('File'),
|
||||
'help' => t('A file that is associated with this node, usually because it is in a field on the node.'),
|
||||
'title' => $this->t('File'),
|
||||
'help' => $this->t('A file that is associated with this node, usually because it is in a field on the node.'),
|
||||
// Only provide this field/relationship/etc.,
|
||||
// when the 'node' base table is present.
|
||||
'skip base' => array('file_managed', 'users_field_data', 'comment_field_data', 'taxonomy_term_field_data'),
|
||||
'real field' => 'fid',
|
||||
'relationship' => array(
|
||||
'title' => t('File'),
|
||||
'label' => t('File'),
|
||||
'title' => $this->t('File'),
|
||||
'label' => $this->t('File'),
|
||||
'base' => 'file_managed',
|
||||
'base field' => 'fid',
|
||||
'relationship field' => 'fid',
|
||||
|
@ -152,15 +152,15 @@ class FileViewsData extends EntityViewsData {
|
|||
|
||||
// Describes relationships between files and users.
|
||||
$data['file_usage']['file_to_user'] = array(
|
||||
'title' => t('User'),
|
||||
'help' => t('A user that is associated with this file, usually because this file is in a field on the user.'),
|
||||
'title' => $this->t('User'),
|
||||
'help' => $this->t('A user that is associated with this file, usually because this file is in a field on the user.'),
|
||||
// Only provide this field/relationship/etc.,
|
||||
// when the 'file_managed' base table is present.
|
||||
'skip base' => array('node_field_data', 'node_field_revision', 'users_field_data', 'comment_field_data', 'taxonomy_term_field_data'),
|
||||
'real field' => 'id',
|
||||
'relationship' => array(
|
||||
'title' => t('User'),
|
||||
'label' => t('User'),
|
||||
'title' => $this->t('User'),
|
||||
'label' => $this->t('User'),
|
||||
'base' => 'users',
|
||||
'base field' => 'uid',
|
||||
'relationship field' => 'id',
|
||||
|
@ -168,15 +168,15 @@ class FileViewsData extends EntityViewsData {
|
|||
),
|
||||
);
|
||||
$data['file_usage']['user_to_file'] = array(
|
||||
'title' => t('File'),
|
||||
'help' => t('A file that is associated with this user, usually because it is in a field on the user.'),
|
||||
'title' => $this->t('File'),
|
||||
'help' => $this->t('A file that is associated with this user, usually because it is in a field on the user.'),
|
||||
// Only provide this field/relationship/etc.,
|
||||
// when the 'users' base table is present.
|
||||
'skip base' => array('file_managed', 'node_field_data', 'node_field_revision', 'comment_field_data', 'taxonomy_term_field_data'),
|
||||
'real field' => 'fid',
|
||||
'relationship' => array(
|
||||
'title' => t('File'),
|
||||
'label' => t('File'),
|
||||
'title' => $this->t('File'),
|
||||
'label' => $this->t('File'),
|
||||
'base' => 'file_managed',
|
||||
'base field' => 'fid',
|
||||
'relationship field' => 'fid',
|
||||
|
@ -185,15 +185,15 @@ class FileViewsData extends EntityViewsData {
|
|||
|
||||
// Describes relationships between files and comments.
|
||||
$data['file_usage']['file_to_comment'] = array(
|
||||
'title' => t('Comment'),
|
||||
'help' => t('A comment that is associated with this file, usually because this file is in a field on the comment.'),
|
||||
'title' => $this->t('Comment'),
|
||||
'help' => $this->t('A comment that is associated with this file, usually because this file is in a field on the comment.'),
|
||||
// Only provide this field/relationship/etc.,
|
||||
// when the 'file_managed' base table is present.
|
||||
'skip base' => array('node_field_data', 'node_field_revision', 'users_field_data', 'comment_field_data', 'taxonomy_term_field_data'),
|
||||
'real field' => 'id',
|
||||
'relationship' => array(
|
||||
'title' => t('Comment'),
|
||||
'label' => t('Comment'),
|
||||
'title' => $this->t('Comment'),
|
||||
'label' => $this->t('Comment'),
|
||||
'base' => 'comment_field_data',
|
||||
'base field' => 'cid',
|
||||
'relationship field' => 'id',
|
||||
|
@ -201,15 +201,15 @@ class FileViewsData extends EntityViewsData {
|
|||
),
|
||||
);
|
||||
$data['file_usage']['comment_to_file'] = array(
|
||||
'title' => t('File'),
|
||||
'help' => t('A file that is associated with this comment, usually because it is in a field on the comment.'),
|
||||
'title' => $this->t('File'),
|
||||
'help' => $this->t('A file that is associated with this comment, usually because it is in a field on the comment.'),
|
||||
// Only provide this field/relationship/etc.,
|
||||
// when the 'comment' base table is present.
|
||||
'skip base' => array('file_managed', 'node_field_data', 'node_field_revision', 'users_field_data', 'taxonomy_term_field_data'),
|
||||
'real field' => 'fid',
|
||||
'relationship' => array(
|
||||
'title' => t('File'),
|
||||
'label' => t('File'),
|
||||
'title' => $this->t('File'),
|
||||
'label' => $this->t('File'),
|
||||
'base' => 'file_managed',
|
||||
'base field' => 'fid',
|
||||
'relationship field' => 'fid',
|
||||
|
@ -218,15 +218,15 @@ class FileViewsData extends EntityViewsData {
|
|||
|
||||
// Describes relationships between files and taxonomy_terms.
|
||||
$data['file_usage']['file_to_taxonomy_term'] = array(
|
||||
'title' => t('Taxonomy Term'),
|
||||
'help' => t('A taxonomy term that is associated with this file, usually because this file is in a field on the taxonomy term.'),
|
||||
'title' => $this->t('Taxonomy Term'),
|
||||
'help' => $this->t('A taxonomy term that is associated with this file, usually because this file is in a field on the taxonomy term.'),
|
||||
// Only provide this field/relationship/etc.,
|
||||
// when the 'file_managed' base table is present.
|
||||
'skip base' => array('node_field_data', 'node_field_revision', 'users_field_data', 'comment_field_data', 'taxonomy_term_field_data'),
|
||||
'real field' => 'id',
|
||||
'relationship' => array(
|
||||
'title' => t('Taxonomy Term'),
|
||||
'label' => t('Taxonomy Term'),
|
||||
'title' => $this->t('Taxonomy Term'),
|
||||
'label' => $this->t('Taxonomy Term'),
|
||||
'base' => 'taxonomy_term_data',
|
||||
'base field' => 'tid',
|
||||
'relationship field' => 'id',
|
||||
|
@ -234,15 +234,15 @@ class FileViewsData extends EntityViewsData {
|
|||
),
|
||||
);
|
||||
$data['file_usage']['taxonomy_term_to_file'] = array(
|
||||
'title' => t('File'),
|
||||
'help' => t('A file that is associated with this taxonomy term, usually because it is in a field on the taxonomy term.'),
|
||||
'title' => $this->t('File'),
|
||||
'help' => $this->t('A file that is associated with this taxonomy term, usually because it is in a field on the taxonomy term.'),
|
||||
// Only provide this field/relationship/etc.,
|
||||
// when the 'taxonomy_term_data' base table is present.
|
||||
'skip base' => array('file_managed', 'node_field_data', 'node_field_revision', 'users_field_data', 'comment_field_data'),
|
||||
'real field' => 'fid',
|
||||
'relationship' => array(
|
||||
'title' => t('File'),
|
||||
'label' => t('File'),
|
||||
'title' => $this->t('File'),
|
||||
'label' => $this->t('File'),
|
||||
'base' => 'file_managed',
|
||||
'base field' => 'fid',
|
||||
'relationship field' => 'fid',
|
||||
|
@ -253,8 +253,8 @@ class FileViewsData extends EntityViewsData {
|
|||
// we've declared joins to, because there is no 'skip base' property on these
|
||||
// fields.
|
||||
$data['file_usage']['module'] = array(
|
||||
'title' => t('Module'),
|
||||
'help' => t('The module managing this file relationship.'),
|
||||
'title' => $this->t('Module'),
|
||||
'help' => $this->t('The module managing this file relationship.'),
|
||||
'field' => array(
|
||||
'id' => 'standard',
|
||||
),
|
||||
|
@ -269,8 +269,8 @@ class FileViewsData extends EntityViewsData {
|
|||
),
|
||||
);
|
||||
$data['file_usage']['type'] = array(
|
||||
'title' => t('Entity type'),
|
||||
'help' => t('The type of entity that is related to the file.'),
|
||||
'title' => $this->t('Entity type'),
|
||||
'help' => $this->t('The type of entity that is related to the file.'),
|
||||
'field' => array(
|
||||
'id' => 'standard',
|
||||
),
|
||||
|
@ -285,8 +285,8 @@ class FileViewsData extends EntityViewsData {
|
|||
),
|
||||
);
|
||||
$data['file_usage']['id'] = array(
|
||||
'title' => t('Entity ID'),
|
||||
'help' => t('The ID of the entity that is related to the file.'),
|
||||
'title' => $this->t('Entity ID'),
|
||||
'help' => $this->t('The ID of the entity that is related to the file.'),
|
||||
'field' => array(
|
||||
'id' => 'numeric',
|
||||
),
|
||||
|
@ -301,8 +301,8 @@ class FileViewsData extends EntityViewsData {
|
|||
),
|
||||
);
|
||||
$data['file_usage']['count'] = array(
|
||||
'title' => t('Use count'),
|
||||
'help' => t('The number of times the file is used by this entity.'),
|
||||
'title' => $this->t('Use count'),
|
||||
'help' => $this->t('The number of times the file is used by this entity.'),
|
||||
'field' => array(
|
||||
'id' => 'numeric',
|
||||
),
|
||||
|
@ -314,8 +314,8 @@ class FileViewsData extends EntityViewsData {
|
|||
),
|
||||
);
|
||||
$data['file_usage']['entity_label'] = array(
|
||||
'title' => t('Entity label'),
|
||||
'help' => t('The label of the entity that is related to the file.'),
|
||||
'title' => $this->t('Entity label'),
|
||||
'help' => $this->t('The label of the entity that is related to the file.'),
|
||||
'real field' => 'id',
|
||||
'field' => array(
|
||||
'id' => 'entity_label',
|
||||
|
|
|
@ -37,43 +37,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 +84,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 +93,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 +102,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 +111,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 +120,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 +129,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 +138,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 +147,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 +156,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 +165,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 +174,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 +183,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 +214,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 +227,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 +239,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 +275,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 +284,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 +293,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 +303,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 +324,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 +357,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 +371,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,
|
||||
|
|
|
@ -20,7 +20,7 @@ class TermViewsData extends EntityViewsData {
|
|||
public function getViewsData() {
|
||||
$data = parent::getViewsData();
|
||||
|
||||
$data['taxonomy_term_field_data']['table']['base']['help'] = t('Taxonomy terms are attached to nodes.');
|
||||
$data['taxonomy_term_field_data']['table']['base']['help'] = $this->t('Taxonomy terms are attached to nodes.');
|
||||
$data['taxonomy_term_field_data']['table']['base']['access query tag'] = 'term_access';
|
||||
$data['taxonomy_term_field_data']['table']['wizard_id'] = 'taxonomy_term';
|
||||
|
||||
|
@ -32,21 +32,21 @@ class TermViewsData extends EntityViewsData {
|
|||
),
|
||||
);
|
||||
|
||||
$data['taxonomy_term_field_data']['tid']['help'] = t('The tid of a taxonomy term.');
|
||||
$data['taxonomy_term_field_data']['tid']['help'] = $this->t('The tid of a taxonomy term.');
|
||||
|
||||
$data['taxonomy_term_field_data']['tid']['argument']['id'] = 'taxonomy';
|
||||
$data['taxonomy_term_field_data']['tid']['argument']['name field'] = 'name';
|
||||
$data['taxonomy_term_field_data']['tid']['argument']['zero is null'] = TRUE;
|
||||
|
||||
$data['taxonomy_term_field_data']['tid']['filter']['id'] = 'taxonomy_index_tid';
|
||||
$data['taxonomy_term_field_data']['tid']['filter']['title'] = t('Term');
|
||||
$data['taxonomy_term_field_data']['tid']['filter']['help'] = t('Taxonomy term chosen from autocomplete or select widget.');
|
||||
$data['taxonomy_term_field_data']['tid']['filter']['title'] = $this->t('Term');
|
||||
$data['taxonomy_term_field_data']['tid']['filter']['help'] = $this->t('Taxonomy term chosen from autocomplete or select widget.');
|
||||
$data['taxonomy_term_field_data']['tid']['filter']['hierarchy table'] = 'taxonomy_term_hierarchy';
|
||||
$data['taxonomy_term_field_data']['tid']['filter']['numeric'] = TRUE;
|
||||
|
||||
$data['taxonomy_term_field_data']['tid_raw'] = array(
|
||||
'title' => t('Term ID'),
|
||||
'help' => t('The tid of a taxonomy term.'),
|
||||
'title' => $this->t('Term ID'),
|
||||
'help' => $this->t('The tid of a taxonomy term.'),
|
||||
'real field' => 'tid',
|
||||
'filter' => array(
|
||||
'id' => 'numeric',
|
||||
|
@ -56,9 +56,9 @@ class TermViewsData extends EntityViewsData {
|
|||
|
||||
$data['taxonomy_term_field_data']['tid_representative'] = array(
|
||||
'relationship' => array(
|
||||
'title' => t('Representative node'),
|
||||
'label' => t('Representative node'),
|
||||
'help' => t('Obtains a single representative node for each term, according to a chosen sort criterion.'),
|
||||
'title' => $this->t('Representative node'),
|
||||
'label' => $this->t('Representative node'),
|
||||
'help' => $this->t('Obtains a single representative node for each term, according to a chosen sort criterion.'),
|
||||
'id' => 'groupwise_max',
|
||||
'relationship field' => 'tid',
|
||||
'outer field' => 'taxonomy_term_field_data.tid',
|
||||
|
@ -70,23 +70,23 @@ class TermViewsData extends EntityViewsData {
|
|||
),
|
||||
);
|
||||
|
||||
$data['taxonomy_term_field_data']['vid']['help'] = t('Filter the results of "Taxonomy: Term" to a particular vocabulary.');
|
||||
$data['taxonomy_term_field_data']['vid']['field']['help'] = t('The vocabulary name.');
|
||||
$data['taxonomy_term_field_data']['vid']['help'] = $this->t('Filter the results of "Taxonomy: Term" to a particular vocabulary.');
|
||||
$data['taxonomy_term_field_data']['vid']['field']['help'] = $this->t('The vocabulary name.');
|
||||
unset($data['taxonomy_term_field_data']['vid']['argument']);
|
||||
unset($data['taxonomy_term_field_data']['vid']['sort']);
|
||||
|
||||
$data['taxonomy_term_field_data']['name']['field']['id'] = 'term_name';
|
||||
$data['taxonomy_term_field_data']['name']['argument']['many to one'] = TRUE;
|
||||
$data['taxonomy_term_field_data']['name']['argument']['empty field name'] = t('Uncategorized');
|
||||
$data['taxonomy_term_field_data']['name']['argument']['empty field name'] = $this->t('Uncategorized');
|
||||
|
||||
$data['taxonomy_term_field_data']['description__value']['field']['click sortable'] = FALSE;
|
||||
|
||||
$data['taxonomy_term_field_data']['changed']['title'] = t('Updated date');
|
||||
$data['taxonomy_term_field_data']['changed']['help'] = t('The date the term was last updated.');
|
||||
$data['taxonomy_term_field_data']['changed']['title'] = $this->t('Updated date');
|
||||
$data['taxonomy_term_field_data']['changed']['help'] = $this->t('The date the term was last updated.');
|
||||
|
||||
$data['taxonomy_term_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',
|
||||
|
@ -94,8 +94,8 @@ class TermViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['taxonomy_term_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',
|
||||
|
@ -103,8 +103,8 @@ class TermViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['taxonomy_term_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',
|
||||
|
@ -112,8 +112,8 @@ class TermViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['taxonomy_term_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',
|
||||
|
@ -121,8 +121,8 @@ class TermViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['taxonomy_term_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',
|
||||
|
@ -130,15 +130,15 @@ class TermViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['taxonomy_term_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['taxonomy_index']['table']['group'] = t('Taxonomy term');
|
||||
$data['taxonomy_index']['table']['group'] = $this->t('Taxonomy term');
|
||||
|
||||
$data['taxonomy_index']['table']['join'] = array(
|
||||
'taxonomy_term_field_data' => array(
|
||||
|
@ -158,13 +158,13 @@ class TermViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['taxonomy_index']['nid'] = array(
|
||||
'title' => t('Content with term'),
|
||||
'help' => t('Relate all content tagged with a term.'),
|
||||
'title' => $this->t('Content with term'),
|
||||
'help' => $this->t('Relate all content tagged with a term.'),
|
||||
'relationship' => array(
|
||||
'id' => 'standard',
|
||||
'base' => 'node',
|
||||
'base field' => 'nid',
|
||||
'label' => t('node'),
|
||||
'label' => $this->t('node'),
|
||||
'skip base' => 'node',
|
||||
),
|
||||
);
|
||||
|
@ -172,19 +172,19 @@ class TermViewsData extends EntityViewsData {
|
|||
// @todo This stuff needs to move to a node field since really it's all
|
||||
// about nodes.
|
||||
$data['taxonomy_index']['tid'] = array(
|
||||
'group' => t('Content'),
|
||||
'title' => t('Has taxonomy term ID'),
|
||||
'help' => t('Display content if it has the selected taxonomy terms.'),
|
||||
'group' => $this->t('Content'),
|
||||
'title' => $this->t('Has taxonomy term ID'),
|
||||
'help' => $this->t('Display content if it has the selected taxonomy terms.'),
|
||||
'argument' => array(
|
||||
'id' => 'taxonomy_index_tid',
|
||||
'name table' => 'taxonomy_term_field_data',
|
||||
'name field' => 'name',
|
||||
'empty field name' => t('Uncategorized'),
|
||||
'empty field name' => $this->t('Uncategorized'),
|
||||
'numeric' => TRUE,
|
||||
'skip base' => 'taxonomy_term_field_data',
|
||||
),
|
||||
'filter' => array(
|
||||
'title' => t('Has taxonomy term'),
|
||||
'title' => $this->t('Has taxonomy term'),
|
||||
'id' => 'taxonomy_index_tid',
|
||||
'hierarchy table' => 'taxonomy_term_hierarchy',
|
||||
'numeric' => TRUE,
|
||||
|
@ -194,32 +194,32 @@ class TermViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['taxonomy_index']['status'] = [
|
||||
'title' => t('Publish status'),
|
||||
'help' => t('Whether or not the content related to a term is published.'),
|
||||
'title' => $this->t('Publish status'),
|
||||
'help' => $this->t('Whether or not the content related to a term is published.'),
|
||||
'filter' => [
|
||||
'id' => 'boolean',
|
||||
'label' => t('Published status'),
|
||||
'label' => $this->t('Published status'),
|
||||
'type' => 'yes-no',
|
||||
],
|
||||
];
|
||||
|
||||
$data['taxonomy_index']['sticky'] = [
|
||||
'title' => t('Sticky status'),
|
||||
'help' => t('Whether or not the content related to a term is sticky.'),
|
||||
'title' => $this->t('Sticky status'),
|
||||
'help' => $this->t('Whether or not the content related to a term is sticky.'),
|
||||
'filter' => [
|
||||
'id' => 'boolean',
|
||||
'label' => t('Sticky status'),
|
||||
'label' => $this->t('Sticky status'),
|
||||
'type' => 'yes-no',
|
||||
],
|
||||
'sort' => [
|
||||
'id' => 'standard',
|
||||
'help' => t('Whether or not the content related to a term is sticky. To list sticky content first, set this to descending.'),
|
||||
'help' => $this->t('Whether or not the content related to a term is sticky. To list sticky content first, set this to descending.'),
|
||||
],
|
||||
];
|
||||
|
||||
$data['taxonomy_index']['created'] = [
|
||||
'title' => t('Post date'),
|
||||
'help' => t('The date the content related to a term was posted.'),
|
||||
'title' => $this->t('Post date'),
|
||||
'help' => $this->t('The date the content related to a term was posted.'),
|
||||
'sort' => [
|
||||
'id' => 'date'
|
||||
],
|
||||
|
@ -228,7 +228,7 @@ class TermViewsData extends EntityViewsData {
|
|||
],
|
||||
];
|
||||
|
||||
$data['taxonomy_term_hierarchy']['table']['group'] = t('Taxonomy term');
|
||||
$data['taxonomy_term_hierarchy']['table']['group'] = $this->t('Taxonomy term');
|
||||
$data['taxonomy_term_hierarchy']['table']['provider'] = 'taxonomy';
|
||||
|
||||
$data['taxonomy_term_hierarchy']['table']['join'] = array(
|
||||
|
@ -245,20 +245,20 @@ class TermViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['taxonomy_term_hierarchy']['parent'] = array(
|
||||
'title' => t('Parent term'),
|
||||
'help' => t('The parent term of the term. This can produce duplicate entries if you are using a vocabulary that allows multiple parents.'),
|
||||
'title' => $this->t('Parent term'),
|
||||
'help' => $this->t('The parent term of the term. This can produce duplicate entries if you are using a vocabulary that allows multiple parents.'),
|
||||
'relationship' => array(
|
||||
'base' => 'taxonomy_term_field_data',
|
||||
'field' => 'parent',
|
||||
'label' => t('Parent'),
|
||||
'label' => $this->t('Parent'),
|
||||
'id' => 'standard',
|
||||
),
|
||||
'filter' => array(
|
||||
'help' => t('Filter the results of "Taxonomy: Term" by the parent pid.'),
|
||||
'help' => $this->t('Filter the results of "Taxonomy: Term" by the parent pid.'),
|
||||
'id' => 'numeric',
|
||||
),
|
||||
'argument' => array(
|
||||
'help' => t('The parent term of the term.'),
|
||||
'help' => $this->t('The parent term of the term.'),
|
||||
'id' => 'taxonomy',
|
||||
),
|
||||
);
|
||||
|
|
|
@ -20,7 +20,7 @@ class UserViewsData extends EntityViewsData {
|
|||
public function getViewsData() {
|
||||
$data = parent::getViewsData();
|
||||
|
||||
$data['users_field_data']['table']['base']['help'] = t('Users who have created accounts on your site.');
|
||||
$data['users_field_data']['table']['base']['help'] = $this->t('Users who have created accounts on your site.');
|
||||
$data['users_field_data']['table']['base']['access query tag'] = 'user_access';
|
||||
|
||||
$data['users_field_data']['table']['wizard_id'] = 'user';
|
||||
|
@ -32,31 +32,31 @@ class UserViewsData extends EntityViewsData {
|
|||
'empty field name' => \Drupal::config('user.settings')->get('anonymous'),
|
||||
);
|
||||
$data['users_field_data']['uid']['filter']['id'] = 'user_name';
|
||||
$data['users_field_data']['uid']['filter']['title'] = t('Name');
|
||||
$data['users_field_data']['uid']['filter']['title'] = $this->t('Name');
|
||||
$data['users_field_data']['uid']['relationship'] = array(
|
||||
'title' => t('Content authored'),
|
||||
'help' => t('Relate content to the user who created it. This relationship will create one record for each content item created by the user.'),
|
||||
'title' => $this->t('Content authored'),
|
||||
'help' => $this->t('Relate content to the user who created it. This relationship will create one record for each content item created by the user.'),
|
||||
'id' => 'standard',
|
||||
'base' => 'node_field_data',
|
||||
'base field' => 'uid',
|
||||
'field' => 'uid',
|
||||
'label' => t('nodes'),
|
||||
'label' => $this->t('nodes'),
|
||||
);
|
||||
|
||||
$data['users_field_data']['uid_raw'] = array(
|
||||
'help' => t('The raw numeric user ID.'),
|
||||
'help' => $this->t('The raw numeric user ID.'),
|
||||
'real field' => 'uid',
|
||||
'filter' => array(
|
||||
'title' => t('The user ID'),
|
||||
'title' => $this->t('The user ID'),
|
||||
'id' => 'numeric',
|
||||
),
|
||||
);
|
||||
|
||||
$data['users_field_data']['uid_representative'] = array(
|
||||
'relationship' => array(
|
||||
'title' => t('Representative node'),
|
||||
'label' => t('Representative node'),
|
||||
'help' => t('Obtains a single representative node for each user, according to a chosen sort criterion.'),
|
||||
'title' => $this->t('Representative node'),
|
||||
'label' => $this->t('Representative node'),
|
||||
'help' => $this->t('Obtains a single representative node for each user, according to a chosen sort criterion.'),
|
||||
'id' => 'groupwise_max',
|
||||
'relationship field' => 'uid',
|
||||
'outer field' => 'users_field_data.uid',
|
||||
|
@ -70,33 +70,33 @@ class UserViewsData extends EntityViewsData {
|
|||
|
||||
$data['users']['uid_current'] = array(
|
||||
'real field' => 'uid',
|
||||
'title' => t('Current'),
|
||||
'help' => t('Filter the view to the currently logged in user.'),
|
||||
'title' => $this->t('Current'),
|
||||
'help' => $this->t('Filter the view to the currently logged in user.'),
|
||||
'filter' => array(
|
||||
'id' => 'user_current',
|
||||
'type' => 'yes-no',
|
||||
),
|
||||
);
|
||||
|
||||
$data['users_field_data']['name']['help'] = t('The user or author name.');
|
||||
$data['users_field_data']['name']['help'] = $this->t('The user or author name.');
|
||||
$data['users_field_data']['name']['field']['default_formatter'] = 'user_name';
|
||||
$data['users_field_data']['name']['filter']['title'] = t('Name (raw)');
|
||||
$data['users_field_data']['name']['filter']['help'] = t('The user or author name. This filter does not check if the user exists and allows partial matching. Does not use autocomplete.');
|
||||
$data['users_field_data']['name']['filter']['title'] = $this->t('Name (raw)');
|
||||
$data['users_field_data']['name']['filter']['help'] = $this->t('The user or author name. This filter does not check if the user exists and allows partial matching. Does not use autocomplete.');
|
||||
|
||||
// Note that this field implements field level access control.
|
||||
$data['users_field_data']['mail']['help'] = t('Email address for a given user. This field is normally not shown to users, so be cautious when using it.');
|
||||
$data['users_field_data']['mail']['help'] = $this->t('Email address for a given user. This field is normally not shown to users, so be cautious when using it.');
|
||||
|
||||
$data['users_field_data']['langcode']['help'] = t('Original language of the user information');
|
||||
$data['users_field_data']['langcode']['help'] = t('Language of the translation of user information');
|
||||
$data['users_field_data']['langcode']['help'] = $this->t('Original language of the user information');
|
||||
$data['users_field_data']['langcode']['help'] = $this->t('Language of the translation of user information');
|
||||
|
||||
$data['users_field_data']['preferred_langcode']['title'] = t('Preferred language');
|
||||
$data['users_field_data']['preferred_langcode']['help'] = t('Preferred language of the user');
|
||||
$data['users_field_data']['preferred_admin_langcode']['title'] = t('Preferred admin language');
|
||||
$data['users_field_data']['preferred_admin_langcode']['help'] = t('Preferred administrative language of the user');
|
||||
$data['users_field_data']['preferred_langcode']['title'] = $this->t('Preferred language');
|
||||
$data['users_field_data']['preferred_langcode']['help'] = $this->t('Preferred language of the user');
|
||||
$data['users_field_data']['preferred_admin_langcode']['title'] = $this->t('Preferred admin language');
|
||||
$data['users_field_data']['preferred_admin_langcode']['help'] = $this->t('Preferred administrative language of the user');
|
||||
|
||||
$data['users_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',
|
||||
|
@ -104,8 +104,8 @@ class UserViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['users_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',
|
||||
|
@ -113,8 +113,8 @@ class UserViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['users_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',
|
||||
|
@ -122,8 +122,8 @@ class UserViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['users_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',
|
||||
|
@ -131,8 +131,8 @@ class UserViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['users_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',
|
||||
|
@ -140,22 +140,22 @@ class UserViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['users_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',
|
||||
),
|
||||
);
|
||||
|
||||
$data['users_field_data']['status']['filter']['label'] = t('Active');
|
||||
$data['users_field_data']['status']['filter']['label'] = $this->t('Active');
|
||||
$data['users_field_data']['status']['filter']['type'] = 'yes-no';
|
||||
|
||||
$data['users_field_data']['changed']['title'] = t('Updated date');
|
||||
$data['users_field_data']['changed']['title'] = $this->t('Updated date');
|
||||
|
||||
$data['users_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',
|
||||
|
@ -163,8 +163,8 @@ class UserViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['users_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',
|
||||
|
@ -172,8 +172,8 @@ class UserViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['users_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',
|
||||
|
@ -181,8 +181,8 @@ class UserViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['users_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',
|
||||
|
@ -190,8 +190,8 @@ class UserViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['users_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',
|
||||
|
@ -199,8 +199,8 @@ class UserViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['users_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',
|
||||
|
@ -208,8 +208,8 @@ class UserViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['users']['data'] = array(
|
||||
'title' => t('Data'),
|
||||
'help' => t('Provides access to the user data service.'),
|
||||
'title' => $this->t('Data'),
|
||||
'help' => $this->t('Provides access to the user data service.'),
|
||||
'real field' => 'uid',
|
||||
'field' => array(
|
||||
'id' => 'user_data',
|
||||
|
@ -217,14 +217,14 @@ class UserViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['users']['user_bulk_form'] = array(
|
||||
'title' => t('Bulk update'),
|
||||
'help' => t('Add a form element that lets you run operations on multiple users.'),
|
||||
'title' => $this->t('Bulk update'),
|
||||
'help' => $this->t('Add a form element that lets you run operations on multiple users.'),
|
||||
'field' => array(
|
||||
'id' => 'user_bulk_form',
|
||||
),
|
||||
);
|
||||
|
||||
$data['user__roles']['table']['group'] = t('User');
|
||||
$data['user__roles']['table']['group'] = $this->t('User');
|
||||
|
||||
$data['user__roles']['table']['join'] = array(
|
||||
'users_field_data' => array(
|
||||
|
@ -234,8 +234,8 @@ class UserViewsData extends EntityViewsData {
|
|||
);
|
||||
|
||||
$data['user__roles']['roles_target_id'] = array(
|
||||
'title' => t('Roles'),
|
||||
'help' => t('Roles that a user belongs to.'),
|
||||
'title' => $this->t('Roles'),
|
||||
'help' => $this->t('Roles that a user belongs to.'),
|
||||
'field' => array(
|
||||
'id' => 'user_roles',
|
||||
'no group by' => TRUE,
|
||||
|
@ -248,15 +248,15 @@ class UserViewsData extends EntityViewsData {
|
|||
'id' => 'user__roles_rid',
|
||||
'name table' => 'role',
|
||||
'name field' => 'name',
|
||||
'empty field name' => t('No role'),
|
||||
'empty field name' => $this->t('No role'),
|
||||
'zero is null' => TRUE,
|
||||
'numeric' => TRUE,
|
||||
),
|
||||
);
|
||||
|
||||
$data['user__roles']['permission'] = array(
|
||||
'title' => t('Permission'),
|
||||
'help' => t('The user permissions.'),
|
||||
'title' => $this->t('Permission'),
|
||||
'help' => $this->t('The user permissions.'),
|
||||
'field' => array(
|
||||
'id' => 'user_permissions',
|
||||
'no group by' => TRUE,
|
||||
|
|
Loading…
Reference in New Issue