diff --git a/lib/Drupal/node/Plugin/views/argument/CreatedDay.php b/lib/Drupal/node/Plugin/views/argument/CreatedDay.php new file mode 100644 index 0000000000000000000000000000000000000000..338744e8eb6af843cabbfd822a49658403368e07 --- /dev/null +++ b/lib/Drupal/node/Plugin/views/argument/CreatedDay.php @@ -0,0 +1,49 @@ +<?php + +namespace Drupal\node\Plugin\views\argument; + +use Drupal\Core\Annotation\Plugin; +use Drupal\views\Plugins\views\argument\Date; + +/** + * Argument handler for a day (DD) + */ + +/** + * @Plugin( + * plugin_id = "node_created_day" + * ) + */ +class CreatedDay extends Date { + /** + * Constructor implementation + */ + function construct() { + parent::construct(); + $this->formula = views_date_sql_extract('DAY', "***table***.$this->real_field"); + $this->format = 'j'; + $this->arg_format = 'd'; + } + + /** + * Provide a link to the next level of the view + */ + function summary_name($data) { + $day = str_pad($data->{$this->name_alias}, 2, '0', STR_PAD_LEFT); + // strtotime respects server timezone, so we need to set the time fixed as utc time + return format_date(strtotime("2005" . "05" . $day . " 00:00:00 UTC"), 'custom', $this->format, 'UTC'); + } + + /** + * Provide a link to the next level of the view + */ + function title() { + $day = str_pad($this->argument, 2, '0', STR_PAD_LEFT); + return format_date(strtotime("2005" . "05" . $day . " 00:00:00 UTC"), 'custom', $this->format, 'UTC'); + } + + function summary_argument($data) { + // Make sure the argument contains leading zeroes. + return str_pad($data->{$this->base_alias}, 2, '0', STR_PAD_LEFT); + } +} diff --git a/lib/Drupal/node/Plugin/views/argument/CreatedFullDate.php b/lib/Drupal/node/Plugin/views/argument/CreatedFullDate.php new file mode 100644 index 0000000000000000000000000000000000000000..b762984798e339c4fdad75de664480a012110d50 --- /dev/null +++ b/lib/Drupal/node/Plugin/views/argument/CreatedFullDate.php @@ -0,0 +1,42 @@ +<?php + +namespace Drupal\node\Plugin\views\argument; + +use Drupal\Core\Annotation\Plugin; +use Drupal\views\Plugins\views\argument\Date; + +/** + * Argument handler for a full date (CCYYMMDD) + */ + +/** + * @Plugin( + * plugin_id = "node_created_fulldate" + * ) + */ +class CreatedFullDate extends Date { + /** + * Constructor implementation + */ + function construct() { + parent::construct(); + $this->format = 'F j, Y'; + $this->arg_format = 'Ymd'; + $this->formula = views_date_sql_format($this->arg_format, "***table***.$this->real_field"); + } + + /** + * Provide a link to the next level of the view + */ + function summary_name($data) { + $created = $data->{$this->name_alias}; + return format_date(strtotime($created . " 00:00:00 UTC"), 'custom', $this->format, 'UTC'); + } + + /** + * Provide a link to the next level of the view + */ + function title() { + return format_date(strtotime($this->argument . " 00:00:00 UTC"), 'custom', $this->format, 'UTC'); + } +} diff --git a/lib/Drupal/node/Plugin/views/argument/CreatedMonth.php b/lib/Drupal/node/Plugin/views/argument/CreatedMonth.php new file mode 100644 index 0000000000000000000000000000000000000000..de27d692f7fe25921a0a137834e83ba9630afd87 --- /dev/null +++ b/lib/Drupal/node/Plugin/views/argument/CreatedMonth.php @@ -0,0 +1,48 @@ +<?php + +namespace Drupal\node\Plugin\views\argument; + +use Drupal\Core\Annotation\Plugin; +use Drupal\views\Plugins\views\argument\Date; + +/** + * Argument handler for a month (MM) + */ + +/** + * @Plugin( + * plugin_id = "node_created_month" + * ) + */ +class CreatedMonth extends Date { + /** + * Constructor implementation + */ + function construct() { + parent::construct(); + $this->formula = views_date_sql_extract('MONTH', "***table***.$this->real_field"); + $this->format = 'F'; + $this->arg_format = 'm'; + } + + /** + * Provide a link to the next level of the view + */ + function summary_name($data) { + $month = str_pad($data->{$this->name_alias}, 2, '0', STR_PAD_LEFT); + return format_date(strtotime("2005" . $month . "15" . " 00:00:00 UTC" ), 'custom', $this->format, 'UTC'); + } + + /** + * Provide a link to the next level of the view + */ + function title() { + $month = str_pad($this->argument, 2, '0', STR_PAD_LEFT); + return format_date(strtotime("2005" . $month . "15" . " 00:00:00 UTC"), 'custom', $this->format, 'UTC'); + } + + function summary_argument($data) { + // Make sure the argument contains leading zeroes. + return str_pad($data->{$this->base_alias}, 2, '0', STR_PAD_LEFT); + } +} diff --git a/lib/Drupal/node/Plugin/views/argument/CreatedWeek.php b/lib/Drupal/node/Plugin/views/argument/CreatedWeek.php new file mode 100644 index 0000000000000000000000000000000000000000..446887a15d3a06e8f4990c34f798dd3cf7c450ee --- /dev/null +++ b/lib/Drupal/node/Plugin/views/argument/CreatedWeek.php @@ -0,0 +1,33 @@ +<?php + +namespace Drupal\node\Plugin\views\argument; + +use Drupal\Core\Annotation\Plugin; +use Drupal\views\Plugins\views\argument\Date; + +/** + * Argument handler for a week. + */ + +/** + * @Plugin( + * plugin_id = "node_created_week" + */ +class CreatedWeek extends Date { + /** + * Constructor implementation + */ + function construct() { + parent::construct(); + $this->arg_format = 'w'; + $this->formula = views_date_sql_extract('WEEK', "***table***.$this->real_field"); + } + + /** + * Provide a link to the next level of the view + */ + function summary_name($data) { + $created = $data->{$this->name_alias}; + return t('Week @week', array('@week' => $created)); + } +} diff --git a/lib/Drupal/node/Plugin/views/argument/CreatedYear.php b/lib/Drupal/node/Plugin/views/argument/CreatedYear.php new file mode 100644 index 0000000000000000000000000000000000000000..7317244d62963286e2887224de212a1a1f8db13b --- /dev/null +++ b/lib/Drupal/node/Plugin/views/argument/CreatedYear.php @@ -0,0 +1,25 @@ +<?php + +namespace Drupal\node\Plugin\views\argument; + +use Drupal\Core\Annotation\Plugin; +use Drupal\views\Plugins\views\argument\Date; + +/** + * Argument handler for a year (CCYY) + */ + +/** + * @Plugin( + * plugin_id = "node_created_year" + */ +class CreatedYear extends Date { + /** + * Constructor implementation + */ + function construct() { + parent::construct(); + $this->arg_format = 'Y'; + $this->formula = views_date_sql_extract('YEAR', "***table***.$this->real_field"); + } +} diff --git a/lib/Drupal/node/Plugin/views/argument/CreatedYearMonth.php b/lib/Drupal/node/Plugin/views/argument/CreatedYearMonth.php new file mode 100644 index 0000000000000000000000000000000000000000..a112cc3829300d77aa5eb4ea23d95246a565a7bd --- /dev/null +++ b/lib/Drupal/node/Plugin/views/argument/CreatedYearMonth.php @@ -0,0 +1,41 @@ +<?php + +namespace Drupal\node\Plugin\views\argument; + +use Drupal\Core\Annotation\Plugin; +use Drupal\views\Plugins\views\argument\Date; + +/** + * Argument handler for a year plus month (CCYYMM) + */ + +/** + * @Plugin( + * plugin_id = "node_created_year_month" + */ +class CreatedYearMonth extends Date { + /** + * Constructor implementation + */ + function construct() { + parent::construct(); + $this->format = 'F Y'; + $this->arg_format = 'Ym'; + $this->formula = views_date_sql_format($this->arg_format, "***table***.$this->real_field"); + } + + /** + * Provide a link to the next level of the view + */ + function summary_name($data) { + $created = $data->{$this->name_alias}; + return format_date(strtotime($created . "15" . " 00:00:00 UTC"), 'custom', $this->format, 'UTC'); + } + + /** + * Provide a link to the next level of the view + */ + function title() { + return format_date(strtotime($this->argument . "15" . " 00:00:00 UTC"), 'custom', $this->format, 'UTC'); + } +} diff --git a/lib/Drupal/node/Plugin/views/argument/views_handler_argument_node_language.inc b/lib/Drupal/node/Plugin/views/argument/Language.php similarity index 75% rename from lib/Drupal/node/Plugin/views/argument/views_handler_argument_node_language.inc rename to lib/Drupal/node/Plugin/views/argument/Language.php index 170388a3ef17b15d246a215f9dd90eb84b3d5994..85615ee55a1e62f3260fdded8b0f1a99da33422b 100644 --- a/lib/Drupal/node/Plugin/views/argument/views_handler_argument_node_language.inc +++ b/lib/Drupal/node/Plugin/views/argument/Language.php @@ -5,10 +5,21 @@ * Definition of views_handler_argument_node_language. */ +namespace Drupal\node\Plugin\views\argument; + +use Drupal\views\Plugins\views\argument\ArgumentPluginBase; +use Drupal\Core\Annotation\Plugin; + /** * Argument handler to accept a language. */ -class views_handler_argument_node_language extends views_handler_argument { + +/** + * @Plugin( + * plugin_id = "node_language" + * ) + */ +class Language extends ArgumentPluginBase { function construct() { parent::construct('language'); } diff --git a/lib/Drupal/node/Plugin/views/argument/views_handler_argument_node_nid.inc b/lib/Drupal/node/Plugin/views/argument/Nid.php similarity index 65% rename from lib/Drupal/node/Plugin/views/argument/views_handler_argument_node_nid.inc rename to lib/Drupal/node/Plugin/views/argument/Nid.php index d951f88c6d0b45ffe7cd0ef082a059eee6b1a0a1..4870cee1d3edb5639775fd306aba14ec7526566a 100644 --- a/lib/Drupal/node/Plugin/views/argument/views_handler_argument_node_nid.inc +++ b/lib/Drupal/node/Plugin/views/argument/Nid.php @@ -5,10 +5,21 @@ * Provide node nid argument handler. */ +namespace Drupal\node\Plugin\views\argument; + +use Drupal\views\Plugins\views\argument\Numeric; +use Drupal\Core\Annotation\Plugin; + /** * Argument handler to accept a node id. */ -class views_handler_argument_node_nid extends views_handler_argument_numeric { + +/** + * @Plugin( + * plugin_id = "node_nid" + * ) + */ +class Nid extends Numeric { /** * Override the behavior of title(). Get the title of the node. */ diff --git a/lib/Drupal/node/Plugin/views/argument/views_handler_argument_node_type.inc b/lib/Drupal/node/Plugin/views/argument/Type.php similarity index 77% rename from lib/Drupal/node/Plugin/views/argument/views_handler_argument_node_type.inc rename to lib/Drupal/node/Plugin/views/argument/Type.php index ea99d7c64b3bc49cd823d3c767b4b027bac3b476..84f1db0457336cce6c495a31bf832c7fb57f331b 100644 --- a/lib/Drupal/node/Plugin/views/argument/views_handler_argument_node_type.inc +++ b/lib/Drupal/node/Plugin/views/argument/Type.php @@ -5,10 +5,21 @@ * Definition of views_handler_argument_node_type. */ +namespace Drupal\node\Plugin\views\argument; + +use Drupal\views\Plugins\views\argument\String; +use Drupal\Core\Annotation\Plugin; + /** * Argument handler to accept a node type. */ -class views_handler_argument_node_type extends views_handler_argument_string { + +/** + * @Plugin( + * plugin_id = "node_type" + * ) + */ +class Type extends String { function construct() { parent::construct('type'); } diff --git a/lib/Drupal/node/Plugin/views/argument/views_handler_argument_node_uid_revision.inc b/lib/Drupal/node/Plugin/views/argument/UidRevision.php similarity index 70% rename from lib/Drupal/node/Plugin/views/argument/views_handler_argument_node_uid_revision.inc rename to lib/Drupal/node/Plugin/views/argument/UidRevision.php index 6a712c1053b879dbe28df279ce4537f1d0d6aae8..feedeb2db43f657720325bb7e45c2e95c35dbc56 100644 --- a/lib/Drupal/node/Plugin/views/argument/views_handler_argument_node_uid_revision.inc +++ b/lib/Drupal/node/Plugin/views/argument/UidRevision.php @@ -5,11 +5,22 @@ * Defintion of views_handler_argument_node_uid_revision. */ +namespace Drupal\node\Plugin\views\argument; + +use Drupal\user\Plugin\views\argument\UserUid; +use Drupal\Core\Annotation\Plugin; + /** * Filter handler to accept a user id to check for nodes that * user posted or created a revision on. */ -class views_handler_argument_node_uid_revision extends UserUid { + +/** + * @Plugin( + * plugin_id = "node_uid_revision" + * ) + */ +class UidRevision extends UserUid { function query($group_by = FALSE) { $this->ensure_my_table(); $placeholder = $this->placeholder(); diff --git a/lib/Drupal/node/Plugin/views/argument/views_handler_argument_node_vid.inc b/lib/Drupal/node/Plugin/views/argument/Vid.php similarity index 79% rename from lib/Drupal/node/Plugin/views/argument/views_handler_argument_node_vid.inc rename to lib/Drupal/node/Plugin/views/argument/Vid.php index 3e684af7d975d12d209842cb015296f00ca282d2..3db2ddd5fc3e070eefd6560710bb02a0b16cbd99 100644 --- a/lib/Drupal/node/Plugin/views/argument/views_handler_argument_node_vid.inc +++ b/lib/Drupal/node/Plugin/views/argument/Vid.php @@ -5,10 +5,21 @@ * Provide node vid argument handler. */ +namespace Drupal\node\Plugin\views\argument; + +use Drupal\views\Plugins\views\argument\Numeric; +use Drupal\Core\Annotation\Plugin; + /** * Argument handler to accept a node revision id. */ -class views_handler_argument_node_vid extends views_handler_argument_numeric { + +/** + * @Plugin( + * plugin_id = "node_vid" + * ) + */ +class Vid extends Numeric { // No constructor is necessary. /** diff --git a/lib/Drupal/node/Plugin/views/argument/views_handler_argument_dates_various.inc b/lib/Drupal/node/Plugin/views/argument/views_handler_argument_dates_various.inc deleted file mode 100644 index 164d70a87e657e9d1d384db2dc783f288b79061f..0000000000000000000000000000000000000000 --- a/lib/Drupal/node/Plugin/views/argument/views_handler_argument_dates_various.inc +++ /dev/null @@ -1,178 +0,0 @@ -<?php - -/** - * @file - * Handlers for various date arguments. - * - * @ingroup views_argument_handlers - */ - -use Drupal\views\Plugins\views\argument\Date; -/** - * Argument handler for a full date (CCYYMMDD) - */ -class views_handler_argument_node_created_fulldate extends Date { - /** - * Constructor implementation - */ - function construct() { - parent::construct(); - $this->format = 'F j, Y'; - $this->arg_format = 'Ymd'; - $this->formula = views_date_sql_format($this->arg_format, "***table***.$this->real_field"); - } - - /** - * Provide a link to the next level of the view - */ - function summary_name($data) { - $created = $data->{$this->name_alias}; - return format_date(strtotime($created . " 00:00:00 UTC"), 'custom', $this->format, 'UTC'); - } - - /** - * Provide a link to the next level of the view - */ - function title() { - return format_date(strtotime($this->argument . " 00:00:00 UTC"), 'custom', $this->format, 'UTC'); - } -} - -/** - * Argument handler for a year (CCYY) - */ -class views_handler_argument_node_created_year extends Date { - /** - * Constructor implementation - */ - function construct() { - parent::construct(); - $this->arg_format = 'Y'; - $this->formula = views_date_sql_extract('YEAR', "***table***.$this->real_field"); - } -} - -/** - * Argument handler for a year plus month (CCYYMM) - */ -class views_handler_argument_node_created_year_month extends Date { - /** - * Constructor implementation - */ - function construct() { - parent::construct(); - $this->format = 'F Y'; - $this->arg_format = 'Ym'; - $this->formula = views_date_sql_format($this->arg_format, "***table***.$this->real_field"); - } - - /** - * Provide a link to the next level of the view - */ - function summary_name($data) { - $created = $data->{$this->name_alias}; - return format_date(strtotime($created . "15" . " 00:00:00 UTC"), 'custom', $this->format, 'UTC'); - } - - /** - * Provide a link to the next level of the view - */ - function title() { - return format_date(strtotime($this->argument . "15" . " 00:00:00 UTC"), 'custom', $this->format, 'UTC'); - } -} - -/** - * Argument handler for a month (MM) - */ -class views_handler_argument_node_created_month extends Date { - /** - * Constructor implementation - */ - function construct() { - parent::construct(); - $this->formula = views_date_sql_extract('MONTH', "***table***.$this->real_field"); - $this->format = 'F'; - $this->arg_format = 'm'; - } - - /** - * Provide a link to the next level of the view - */ - function summary_name($data) { - $month = str_pad($data->{$this->name_alias}, 2, '0', STR_PAD_LEFT); - return format_date(strtotime("2005" . $month . "15" . " 00:00:00 UTC" ), 'custom', $this->format, 'UTC'); - } - - /** - * Provide a link to the next level of the view - */ - function title() { - $month = str_pad($this->argument, 2, '0', STR_PAD_LEFT); - return format_date(strtotime("2005" . $month . "15" . " 00:00:00 UTC"), 'custom', $this->format, 'UTC'); - } - - function summary_argument($data) { - // Make sure the argument contains leading zeroes. - return str_pad($data->{$this->base_alias}, 2, '0', STR_PAD_LEFT); - } -} - -/** - * Argument handler for a day (DD) - */ -class views_handler_argument_node_created_day extends Date { - /** - * Constructor implementation - */ - function construct() { - parent::construct(); - $this->formula = views_date_sql_extract('DAY', "***table***.$this->real_field"); - $this->format = 'j'; - $this->arg_format = 'd'; - } - - /** - * Provide a link to the next level of the view - */ - function summary_name($data) { - $day = str_pad($data->{$this->name_alias}, 2, '0', STR_PAD_LEFT); - // strtotime respects server timezone, so we need to set the time fixed as utc time - return format_date(strtotime("2005" . "05" . $day . " 00:00:00 UTC"), 'custom', $this->format, 'UTC'); - } - - /** - * Provide a link to the next level of the view - */ - function title() { - $day = str_pad($this->argument, 2, '0', STR_PAD_LEFT); - return format_date(strtotime("2005" . "05" . $day . " 00:00:00 UTC"), 'custom', $this->format, 'UTC'); - } - - function summary_argument($data) { - // Make sure the argument contains leading zeroes. - return str_pad($data->{$this->base_alias}, 2, '0', STR_PAD_LEFT); - } -} - -/** - * Argument handler for a week. - */ -class views_handler_argument_node_created_week extends Date { - /** - * Constructor implementation - */ - function construct() { - parent::construct(); - $this->arg_format = 'w'; - $this->formula = views_date_sql_extract('WEEK', "***table***.$this->real_field"); - } - - /** - * Provide a link to the next level of the view - */ - function summary_name($data) { - $created = $data->{$this->name_alias}; - return t('Week @week', array('@week' => $created)); - } -} diff --git a/lib/Drupal/node/Plugin/views/argument_default/views_plugin_argument_default_node.inc b/lib/Drupal/node/Plugin/views/argument_default/Node.php similarity index 67% rename from lib/Drupal/node/Plugin/views/argument_default/views_plugin_argument_default_node.inc rename to lib/Drupal/node/Plugin/views/argument_default/Node.php index b7fb1282a7cd605d2d38c041d00f829728120fe1..0ebf9f85d86388e1ad57e64933ce8f316bcdc148 100644 --- a/lib/Drupal/node/Plugin/views/argument_default/views_plugin_argument_default_node.inc +++ b/lib/Drupal/node/Plugin/views/argument_default/Node.php @@ -5,6 +5,10 @@ * Contains the node from URL argument default plugin. */ +namespace Drupal\node\Plugin\views\argument_default; + +use Drupal\Core\Annotation\Plugin; +use Drupal\Core\Annotation\Translation; use Drupal\views\Plugins\views\argument_default\ArgumentDefaultPluginBase; /** @@ -12,7 +16,14 @@ * * This plugin actually has no options so it odes not need to do a great deal. */ -class views_plugin_argument_default_node extends ArgumentDefaultPluginBase { + +/** + * @Plugin( + * plugin_id = "node", + * title = @Translation("Content ID from URL") + * ) + */ +class Node extends ArgumentDefaultPluginBase { function get_argument() { foreach (range(1, 3) as $i) { $node = menu_get_object('node', $i); diff --git a/lib/Drupal/node/Plugin/views/argument_validate/views_plugin_argument_validate_node.inc b/lib/Drupal/node/Plugin/views/argument_validator/Node.php similarity index 94% rename from lib/Drupal/node/Plugin/views/argument_validate/views_plugin_argument_validate_node.inc rename to lib/Drupal/node/Plugin/views/argument_validator/Node.php index d031e110970d630d7bb4c91cee8625cb07e51ee4..83c6d51165450a3ff1e36b6e3985df14fc0c21b9 100644 --- a/lib/Drupal/node/Plugin/views/argument_validate/views_plugin_argument_validate_node.inc +++ b/lib/Drupal/node/Plugin/views/argument_validator/Node.php @@ -5,12 +5,23 @@ * Contains the 'node' argument validator plugin. */ +namespace Drupal\node\Plugin\views\argument_validator; + +use Drupal\Core\Annotation\Plugin; +use Drupal\Core\Annotation\Translation; use Drupal\views\Plugins\views\argument_validator\ArgumentValidatorPluginBase; /** * Validate whether an argument is an acceptable node. */ -class views_plugin_argument_validate_node extends ArgumentValidatorPluginBase { + +/** + * @Plugin( + * plugin_id = "node", + * title = @Translation("Content") + * ) + */ +class Node extends ArgumentValidatorPluginBase { function option_definition() { $options = parent::option_definition(); $options['types'] = array('default' => array()); diff --git a/lib/Drupal/node/Plugin/views/field/views_handler_field_history_user_timestamp.inc b/lib/Drupal/node/Plugin/views/field/HistoryUserTimestamp.php similarity index 93% rename from lib/Drupal/node/Plugin/views/field/views_handler_field_history_user_timestamp.inc rename to lib/Drupal/node/Plugin/views/field/HistoryUserTimestamp.php index e4964eac801bac9eb16d68066d1b357b09a0e874..2c70b6657c2d87f0018574166b4eded5a2475677 100644 --- a/lib/Drupal/node/Plugin/views/field/views_handler_field_history_user_timestamp.inc +++ b/lib/Drupal/node/Plugin/views/field/HistoryUserTimestamp.php @@ -5,6 +5,11 @@ * Definition of views_handler_field_history_user_timestamp. */ +namespace Drupal\node\Plugin\views\field; + +use Drupal\node\Plugin\views\field\Node; +use Drupal\Core\Annotation\Plugin; + /** * Field handler to display the marker for new content. * @@ -13,7 +18,7 @@ * * @ingroup views_field_handlers */ -class views_handler_field_history_user_timestamp extends views_handler_field_node { +class HistoryUserTimestamp extends Node { function init(&$view, &$options) { parent::init($view, $options); global $user; diff --git a/lib/Drupal/node/Plugin/views/field/views_handler_field_node_link.inc b/lib/Drupal/node/Plugin/views/field/Link.php similarity index 85% rename from lib/Drupal/node/Plugin/views/field/views_handler_field_node_link.inc rename to lib/Drupal/node/Plugin/views/field/Link.php index 7e9bbd2a8602ecf600d0db90df3a6371cafde76b..d59638bea4897d2744fde8fe8e68e8426ad42cc3 100644 --- a/lib/Drupal/node/Plugin/views/field/views_handler_field_node_link.inc +++ b/lib/Drupal/node/Plugin/views/field/Link.php @@ -5,12 +5,23 @@ * Definition of views_handler_field_node_link. */ +namespace Drupal\node\Plugin\views\field; + +use Drupal\views\Plugins\views\field\Entity; +use Drupal\Core\Annotation\Plugin; + /** * Field handler to present a link to the node. * * @ingroup views_field_handlers */ -class views_handler_field_node_link extends views_handler_field_entity { + +/** + * @Plugin( + * plugin_id = "node_link" + * ) + */ +class Link extends Entity { function option_definition() { $options = parent::option_definition(); diff --git a/lib/Drupal/node/Plugin/views/field/views_handler_field_node_link_delete.inc b/lib/Drupal/node/Plugin/views/field/LinkDelete.php similarity index 75% rename from lib/Drupal/node/Plugin/views/field/views_handler_field_node_link_delete.inc rename to lib/Drupal/node/Plugin/views/field/LinkDelete.php index 8271c0baca058e06bd2806e71fc02a5a0392ab8a..0b2362658ee7a933a447cd4273f474df608d7dda 100644 --- a/lib/Drupal/node/Plugin/views/field/views_handler_field_node_link_delete.inc +++ b/lib/Drupal/node/Plugin/views/field/LinkDelete.php @@ -5,12 +5,23 @@ * Definition of views_handler_field_node_link_delete. */ +namespace Drupal\node\Plugin\views\field; + +use Drupal\node\Plugin\views\field\Link; +use Drupal\Core\Annotation\Plugin; + /** * Field handler to present a link to delete a node. * * @ingroup views_field_handlers */ -class views_handler_field_node_link_delete extends views_handler_field_node_link { + +/** + * @Plugin( + * plugin_id = "node_link_delete" + * ) + */ +class LinkDelete extends Link { /** * Renders the link. diff --git a/lib/Drupal/node/Plugin/views/field/views_handler_field_node_link_edit.inc b/lib/Drupal/node/Plugin/views/field/LinkEdit.php similarity index 75% rename from lib/Drupal/node/Plugin/views/field/views_handler_field_node_link_edit.inc rename to lib/Drupal/node/Plugin/views/field/LinkEdit.php index 4e8aad00b43ccb7a8833d94c4cf29872d508361e..7e8568b1ef436f30ed5cc8d8f17c9f024a9061e8 100644 --- a/lib/Drupal/node/Plugin/views/field/views_handler_field_node_link_edit.inc +++ b/lib/Drupal/node/Plugin/views/field/LinkEdit.php @@ -5,12 +5,23 @@ * Definition of views_handler_field_node_link_edit. */ +namespace Drupal\node\Plugin\views\field; + +use Drupal\node\Plugin\views\field\Link; +use Drupal\Core\Annotation\Plugin; + /** * Field handler to present a link node edit. * * @ingroup views_field_handlers */ -class views_handler_field_node_link_edit extends views_handler_field_node_link { + +/** + * @Plugin( + * plugin_id = "node_link_edit" + * ) + */ +class LinkEdit extends Link { /** * Renders the link. diff --git a/lib/Drupal/node/Plugin/views/field/views_handler_field_node.inc b/lib/Drupal/node/Plugin/views/field/Node.php similarity index 93% rename from lib/Drupal/node/Plugin/views/field/views_handler_field_node.inc rename to lib/Drupal/node/Plugin/views/field/Node.php index 9785faf71825ca6f0289e96fbd1f25d7e32f0fe1..b8c88bb43453e4585b34db09f8d514d1d5cdd87b 100644 --- a/lib/Drupal/node/Plugin/views/field/views_handler_field_node.inc +++ b/lib/Drupal/node/Plugin/views/field/Node.php @@ -5,7 +5,10 @@ * Contains the basic 'node' field handler. */ +namespace Drupal\node\Plugin\views\field; + use Drupal\views\Plugins\views\field\FieldPluginBase; +use Drupal\Core\Annotation\Plugin; /** * Field handler to provide simple renderer that allows linking to a node. @@ -14,7 +17,13 @@ * * @ingroup views_field_handlers */ -class views_handler_field_node extends FieldPluginBase { + +/** + * @Plugin( + * plugin_id = "node" + * ) + */ +class Node extends FieldPluginBase { function init(&$view, &$options) { parent::init($view, $options); diff --git a/lib/Drupal/node/Plugin/views/field/views_handler_field_node_path.inc b/lib/Drupal/node/Plugin/views/field/Path.php similarity index 83% rename from lib/Drupal/node/Plugin/views/field/views_handler_field_node_path.inc rename to lib/Drupal/node/Plugin/views/field/Path.php index f47f85fab99e8075073b47f94b6093ac0f11cd64..03dbc6867863c0dbae3d2c833c0d4d8f9ed531a4 100644 --- a/lib/Drupal/node/Plugin/views/field/views_handler_field_node_path.inc +++ b/lib/Drupal/node/Plugin/views/field/Path.php @@ -5,12 +5,23 @@ * Handler for node path field. */ +namespace Drupal\node\Plugin\views\field; + +use Drupal\views\Plugins\views\field\FieldPluginBase; +use Drupal\Core\Annotation\Plugin; + /** * Field handler to present the path to the node. * * @ingroup views_field_handlers */ -class views_handler_field_node_path extends views_handler_field { + +/** + * @Plugin( + * plugin_id = "node_path" + * ) + */ +class Path extends FieldPluginBase { function option_definition() { $options = parent::option_definition(); diff --git a/lib/Drupal/node/Plugin/views/field/views_handler_field_node_revision.inc b/lib/Drupal/node/Plugin/views/field/Revision.php similarity index 90% rename from lib/Drupal/node/Plugin/views/field/views_handler_field_node_revision.inc rename to lib/Drupal/node/Plugin/views/field/Revision.php index c04693a815528ad0ddc88ad436e92a8b342e3c54..a20d337259e1ed44246a980b6beeb39f60b01df7 100644 --- a/lib/Drupal/node/Plugin/views/field/views_handler_field_node_revision.inc +++ b/lib/Drupal/node/Plugin/views/field/Revision.php @@ -5,6 +5,11 @@ * Definition of views_handler_field_node_revision. */ +namespace Drupal\node\Plugin\views\field; + +use Drupal\node\Plugin\views\field\Node; +use Drupal\Core\Annotation\Plugin; + /** * Contains the basic 'node_revision' field handler. */ @@ -14,7 +19,13 @@ * * @ingroup views_field_handlers */ -class views_handler_field_node_revision extends views_handler_field_node { + +/** + * @Plugin( + * plugin_id = "node_revision" + * ) + */ +class Revision extends Node { function init(&$view, &$options) { parent::init($view, $options); if (!empty($this->options['link_to_node_revision'])) { diff --git a/lib/Drupal/node/Plugin/views/field/views_handler_field_node_revision_link.inc b/lib/Drupal/node/Plugin/views/field/RevisionLink.php similarity index 88% rename from lib/Drupal/node/Plugin/views/field/views_handler_field_node_revision_link.inc rename to lib/Drupal/node/Plugin/views/field/RevisionLink.php index 69047bbb19d775c4c00d7d2d6152486a03d15c2a..23a20d8a81c8a0b4c2299ad0e8635a4799de8dd3 100644 --- a/lib/Drupal/node/Plugin/views/field/views_handler_field_node_revision_link.inc +++ b/lib/Drupal/node/Plugin/views/field/RevisionLink.php @@ -5,12 +5,23 @@ * Definition of views_handler_field_node_revision_link. */ +namespace Drupal\node\Plugin\views\field; + +use Drupal\node\Plugin\views\field\Link; +use Drupal\Core\Annotation\Plugin; + /** * Field handler to present a link to a node revision. * * @ingroup views_field_handlers */ -class views_handler_field_node_revision_link extends views_handler_field_node_link { + +/** + * @Plugin( + * plugin_id = "node_revision_link" + * ) + */ +class RevisionLink extends Link { function construct() { parent::construct(); diff --git a/lib/Drupal/node/Plugin/views/field/views_handler_field_node_revision_link_delete.inc b/lib/Drupal/node/Plugin/views/field/RevisionLinkDelete.php similarity index 77% rename from lib/Drupal/node/Plugin/views/field/views_handler_field_node_revision_link_delete.inc rename to lib/Drupal/node/Plugin/views/field/RevisionLinkDelete.php index e0d00a7862c5ca669578f3a676f83662d078b967..153698a4194e61d570a88340dce9272a0fa6b831 100644 --- a/lib/Drupal/node/Plugin/views/field/views_handler_field_node_revision_link_delete.inc +++ b/lib/Drupal/node/Plugin/views/field/RevisionLinkDelete.php @@ -5,12 +5,23 @@ * Definition of views_handler_field_node_revision_link_delete. */ +namespace Drupal\node\Plugin\views\field; + +use Drupal\node\Plugin\views\field\RevisionLink; +use Drupal\Core\Annotation\Plugin; + /** * Field handler to present link to delete a node revision. * * @ingroup views_field_handlers */ -class views_handler_field_node_revision_link_delete extends views_handler_field_node_revision_link { + +/** + * @Plugin( + * plugin_id = "node_revision_link_delete" + * ) + */ +class RevisionLinkDelete extends RevisionLink { function access() { return user_access('delete revisions') || user_access('administer nodes'); diff --git a/lib/Drupal/node/Plugin/views/field/views_handler_field_node_revision_link_revert.inc b/lib/Drupal/node/Plugin/views/field/RevisionLinkRevert.php similarity index 77% rename from lib/Drupal/node/Plugin/views/field/views_handler_field_node_revision_link_revert.inc rename to lib/Drupal/node/Plugin/views/field/RevisionLinkRevert.php index af2044270c89552f6f822750ae7283e313aa6cb1..986e5331de8cbe3db8263a578874a7ca4d723fac 100644 --- a/lib/Drupal/node/Plugin/views/field/views_handler_field_node_revision_link_revert.inc +++ b/lib/Drupal/node/Plugin/views/field/RevisionLinkRevert.php @@ -5,12 +5,23 @@ * Definition of views_handler_field_node_revision_link_revert. */ +namespace Drupal\node\Plugin\views\field; + +use Drupal\node\Plugin\views\field\RevisionLink; +use Drupal\Core\Annotation\Plugin; + /** * Field handler to present a link to revert a node to a revision. * * @ingroup views_field_handlers */ -class views_handler_field_node_revision_link_revert extends views_handler_field_node_revision_link { + +/** + * @Plugin( + * plugin_id = "node_revision_link_revert" + * ) + */ +class RevisionLinkRevert extends RevisionLink { function access() { return user_access('revert revisions') || user_access('administer nodes'); diff --git a/lib/Drupal/node/Plugin/views/field/views_handler_field_node_type.inc b/lib/Drupal/node/Plugin/views/field/Type.php similarity index 88% rename from lib/Drupal/node/Plugin/views/field/views_handler_field_node_type.inc rename to lib/Drupal/node/Plugin/views/field/Type.php index ba8ee3eb81b338f54767b53eff6b8a36602bad91..fd452ac941169e9d4f2a41889f9daff318895615 100644 --- a/lib/Drupal/node/Plugin/views/field/views_handler_field_node_type.inc +++ b/lib/Drupal/node/Plugin/views/field/Type.php @@ -5,12 +5,22 @@ * Definition of views_handler_field_node_type. */ +namespace Drupal\node\Plugin\views\field; + +use Drupal\node\Plugin\views\field\Node; + /** * Field handler to translate a node type into its readable form. * * @ingroup views_field_handlers */ -class views_handler_field_node_type extends views_handler_field_node { + +/** + * @Plugin( + * plugin_id = "node_type" + * ) + */ +class Type extends Node { function option_definition() { $options = parent::option_definition(); $options['machine_name'] = array('default' => FALSE, 'bool' => TRUE); diff --git a/lib/Drupal/node/Plugin/views/filter/views_handler_filter_node_access.inc b/lib/Drupal/node/Plugin/views/filter/Access.php similarity index 87% rename from lib/Drupal/node/Plugin/views/filter/views_handler_filter_node_access.inc rename to lib/Drupal/node/Plugin/views/filter/Access.php index ba0490a79b0124439415641cd65d29fe1a7e365b..3fdecf76798a01f95210ce279a7fbfe58dc34e28 100644 --- a/lib/Drupal/node/Plugin/views/filter/views_handler_filter_node_access.inc +++ b/lib/Drupal/node/Plugin/views/filter/Access.php @@ -5,15 +5,22 @@ * Definition of views_handler_filter_node_access. */ -use Drupal\views\Plugins\views\filter\FilterPluginBase; +namespace Drupal\node\Plugin\views\filter; +use Drupal\views\Plugins\views\filter\FilterPluginBase; /** * Filter by node_access records. * * @ingroup views_filter_handlers */ -class views_handler_filter_node_access extends FilterPluginBase { + +/** + * @Plugin( + * plugin_id = "node_access" + * ) + */ +class Access extends FilterPluginBase { function admin_summary() { } function operator_form(&$form, &$form_state) { } function can_expose() { diff --git a/lib/Drupal/node/Plugin/views/filter/views_handler_filter_history_user_timestamp.inc b/lib/Drupal/node/Plugin/views/filter/HistoryUserTimestamp.php similarity index 94% rename from lib/Drupal/node/Plugin/views/filter/views_handler_filter_history_user_timestamp.inc rename to lib/Drupal/node/Plugin/views/filter/HistoryUserTimestamp.php index fbd0e79a796bce9300ca5c76b0f1b49e995881fe..81841a01bf61fdc060fca4beef0ef1c528ff798e 100644 --- a/lib/Drupal/node/Plugin/views/filter/views_handler_filter_history_user_timestamp.inc +++ b/lib/Drupal/node/Plugin/views/filter/HistoryUserTimestamp.php @@ -5,6 +5,8 @@ * Definition of views_handler_filter_history_user_timestamp. */ +namespace Drupal\node\Plugin\views\filter; + use Drupal\views\Plugins\views\filter\FilterPluginBase; /** @@ -15,7 +17,13 @@ * * @ingroup views_filter_handlers */ -class views_handler_filter_history_user_timestamp extends FilterPluginBase { + +/** + * @Plugin( + * plugin_id = "node_history_user_timestamp" + * ) + */ +class HistoryUserTimestamp extends FilterPluginBase { // Don't display empty space where the operator would be. var $no_operator = TRUE; diff --git a/lib/Drupal/node/Plugin/views/filter/Status.php b/lib/Drupal/node/Plugin/views/filter/Status.php index e827de12817752f33f29722532463caa5156b534..09fde602907dc63e3ca091cca2cf4b256a0d519a 100644 --- a/lib/Drupal/node/Plugin/views/filter/Status.php +++ b/lib/Drupal/node/Plugin/views/filter/Status.php @@ -14,6 +14,12 @@ * * @ingroup views_filter_handlers */ + +/** + * @Plugin( + * plugin_id = "node_status" + * ) + */ class Status extends FilterPluginBase { function admin_summary() { } function operator_form(&$form, &$form_state) { } diff --git a/lib/Drupal/node/Plugin/views/filter/views_handler_filter_node_type.inc b/lib/Drupal/node/Plugin/views/filter/Type.php similarity index 80% rename from lib/Drupal/node/Plugin/views/filter/views_handler_filter_node_type.inc rename to lib/Drupal/node/Plugin/views/filter/Type.php index 48a69e11f34ccc41e5939d3295dc3581e326f791..00f21d2a6f407f6614e1f774431789ca87be63dd 100644 --- a/lib/Drupal/node/Plugin/views/filter/views_handler_filter_node_type.inc +++ b/lib/Drupal/node/Plugin/views/filter/Type.php @@ -5,6 +5,8 @@ * Definition of views_handler_filter_node_type. */ +namespace Drupal\node\Plugin\views\filter; + use Drupal\views\Plugins\views\filter\InOperator; /** @@ -12,7 +14,13 @@ * * @ingroup views_filter_handlers */ -class views_handler_filter_node_type extends InOperator { + +/** + * @Plugin( + * plugin_id = "node_type" + * ) + */ +class Type extends InOperator { function get_value_options() { if (!isset($this->value_options)) { $this->value_title = t('Content types'); diff --git a/lib/Drupal/node/Plugin/views/filter/views_handler_filter_node_uid_revision.inc b/lib/Drupal/node/Plugin/views/filter/UidRevision.php similarity index 77% rename from lib/Drupal/node/Plugin/views/filter/views_handler_filter_node_uid_revision.inc rename to lib/Drupal/node/Plugin/views/filter/UidRevision.php index 4d3d9a70cc62e739f0d368ffa4ffe5b235eee653..016befa7b03d94014e6ff7163aa25e21891bd1a9 100644 --- a/lib/Drupal/node/Plugin/views/filter/views_handler_filter_node_uid_revision.inc +++ b/lib/Drupal/node/Plugin/views/filter/UidRevision.php @@ -5,12 +5,22 @@ * Definition of views_handler_filter_node_uid_revision. */ +namespace Drupal\node\Plugin\views\filter; + +use Drupal\user\Plugin\views\filter\Name; + /** * Filter handler to check for revisions a certain user has created. * * @ingroup views_filter_handlers */ -class views_handler_filter_node_uid_revision extends views_handler_filter_user_name { + +/** + * @Plugin( + * plugin_id = "node_uid_revision" + * ) + */ +class UidRevision extends Name { function query($group_by = FALSE) { $this->ensure_my_table(); diff --git a/lib/Drupal/node/Plugin/views/row/views_plugin_row_node_rss.inc b/lib/Drupal/node/Plugin/views/row/Rss.php similarity index 91% rename from lib/Drupal/node/Plugin/views/row/views_plugin_row_node_rss.inc rename to lib/Drupal/node/Plugin/views/row/Rss.php index 662dc6407b8324f6a96a14e024768b50c6463867..ffdc20f4d746aa523f89dc62d6fc7a65c5cc87aa 100644 --- a/lib/Drupal/node/Plugin/views/row/views_plugin_row_node_rss.inc +++ b/lib/Drupal/node/Plugin/views/row/Rss.php @@ -5,13 +5,30 @@ * Contains the node RSS row style plugin. */ +namespace Drupal\node\Plugin\views\row; + +use Drupal\Core\Annotation\Plugin; +use Drupal\Core\Annotation\Translation; use Drupal\views\Plugins\views\row\RowPluginBase; /** * Plugin which performs a node_view on the resulting object * and formats it as an RSS item. */ -class views_plugin_row_node_rss extends RowPluginBase { + +/** + * @Plugin( + * plugin_id = "node_rss", + * title = @Translation("Content"), + * help = @Translation("Display the content with standard node view."), + * theme = "views_view_row_rss", + * base = {"node"}, + * uses_options = TRUE, + * type = "feed", + * help_topic = "style-node-rss" + * ) + */ +class Rss extends RowPluginBase { // Basic properties that let the row style follow relationships. var $base_table = 'node'; var $base_field = 'nid'; diff --git a/lib/Drupal/node/Plugin/views/row/views_plugin_row_node_view.inc b/lib/Drupal/node/Plugin/views/row/View.php similarity index 87% rename from lib/Drupal/node/Plugin/views/row/views_plugin_row_node_view.inc rename to lib/Drupal/node/Plugin/views/row/View.php index 1ae2008a5b2ba605f914ae7ed74fcae6ba050221..f83e11e3ad93a30f6593806c6fa130636fc0eeed 100644 --- a/lib/Drupal/node/Plugin/views/row/views_plugin_row_node_view.inc +++ b/lib/Drupal/node/Plugin/views/row/View.php @@ -5,6 +5,10 @@ * Contains the node view row style plugin. */ +namespace Drupal\node\Plugin\views\row; + +use Drupal\Core\Annotation\Plugin; +use Drupal\Core\Annotation\Translation; use Drupal\views\Plugins\views\row\RowPluginBase; /** @@ -14,7 +18,19 @@ * * @ingroup views_row_plugins */ -class views_plugin_row_node_view extends RowPluginBase { + +/** + * @Plugin( + * plugin_id = "node", + * title = @Translation("Content"), + * help = @Translation("Display the content with standard node view."), + * base = {"node"}, + * uses_options = TRUE, + * type = "normal", + * help_topic = "style-node" + * ) + */ +class View extends RowPluginBase { // Basic properties that let the row style follow relationships. var $base_table = 'node'; var $base_field = 'nid'; diff --git a/modules/node.views.inc b/modules/node.views.inc index 7e9b2abf011048a2ca6e0497e68add2f503cf801..2e61ed9c674740f5b93ecdb964b0c7090b7d8d49 100644 --- a/modules/node.views.inc +++ b/modules/node.views.inc @@ -48,12 +48,12 @@ function node_views_data() { 'help' => t('The node ID.'), // The help that appears on the UI, // Information for displaying the nid 'field' => array( - 'handler' => 'views_handler_field_node', + 'plugin_id' => 'node', 'click sortable' => TRUE, ), // Information for accepting a nid as an argument 'argument' => array( - 'handler' => 'views_handler_argument_node_nid', + 'plugin_id' => 'node_nid', 'name field' => 'title', // the field to display in the summary. 'numeric' => TRUE, 'validate type' => 'nid', @@ -77,7 +77,7 @@ function node_views_data() { 'field' => array( 'field' => 'title', // the real field. This could be left out since it is the same. 'group' => t('Content'), // The group it appears in on the UI. Could be left out. - 'handler' => 'views_handler_field_node', + 'plugin_id' => 'node', 'click sortable' => TRUE, 'link_to_node default' => TRUE, ), @@ -130,17 +130,17 @@ function node_views_data() { 'title' => t('Type'), // The item it appears as on the UI, 'help' => t('The content type (for example, "blog entry", "forum post", "story", etc).'), // The help that appears on the UI, 'field' => array( - 'handler' => 'views_handler_field_node_type', + 'plugin_id' => 'node_type', 'click sortable' => TRUE, ), 'sort' => array( 'plugin_id' => 'standard', ), 'filter' => array( - 'handler' => 'views_handler_filter_node_type', + 'plugin_id' => 'node_type', ), 'argument' => array( - 'handler' => 'views_handler_argument_node_type', + 'plugin_id' => 'node_type', ), ); @@ -172,7 +172,7 @@ function node_views_data() { 'help' => t('Filters out unpublished content if the current user cannot view it.'), 'filter' => array( 'field' => 'status', - 'handler' => 'Drupal\node\Plugin\views\filter\Status', + 'plugin_id' => 'node_status', 'label' => t('Published or admin'), ), ); @@ -232,7 +232,7 @@ function node_views_data() { 'field' => array( 'title' => t('Link'), 'help' => t('Provide a simple link to the content.'), - 'handler' => 'views_handler_field_node_link', + 'plugin_id' => 'node_link', ), ); @@ -241,7 +241,7 @@ function node_views_data() { 'field' => array( 'title' => t('Edit link'), 'help' => t('Provide a simple link to edit the content.'), - 'handler' => 'views_handler_field_node_link_edit', + 'plugin_id' => 'node_link_edit', ), ); @@ -250,7 +250,7 @@ function node_views_data() { 'field' => array( 'title' => t('Delete link'), 'help' => t('Provide a simple link to delete the content.'), - 'handler' => 'views_handler_field_node_link_delete', + 'plugin_id' => 'node_link_delete', ), ); @@ -258,7 +258,7 @@ function node_views_data() { 'field' => array( 'title' => t('Path'), 'help' => t('The aliased path to this content.'), - 'handler' => 'views_handler_field_node_path', + 'plugin_id' => 'node_path', ), ); @@ -270,7 +270,7 @@ function node_views_data() { 'help' => t('Date in the form of CCYYMMDD.'), 'argument' => array( 'field' => 'created', - 'handler' => 'views_handler_argument_node_created_fulldate', + 'plugin_id' => 'node_created_fulldate', ), ); @@ -279,7 +279,7 @@ function node_views_data() { 'help' => t('Date in the form of YYYYMM.'), 'argument' => array( 'field' => 'created', - 'handler' => 'views_handler_argument_node_created_year_month', + 'plugin_id' => 'node_created_year_month', ), ); @@ -288,7 +288,7 @@ function node_views_data() { 'help' => t('Date in the form of YYYY.'), 'argument' => array( 'field' => 'created', - 'handler' => 'views_handler_argument_node_created_year', + 'plugin_id' => 'node_created_year', ), ); @@ -297,7 +297,7 @@ function node_views_data() { 'help' => t('Date in the form of MM (01 - 12).'), 'argument' => array( 'field' => 'created', - 'handler' => 'views_handler_argument_node_created_month', + 'plugin_id' => 'node_created_month', ), ); @@ -306,7 +306,7 @@ function node_views_data() { 'help' => t('Date in the form of DD (01 - 31).'), 'argument' => array( 'field' => 'created', - 'handler' => 'views_handler_argument_node_created_day', + 'plugin_id' => 'node_created_day', ), ); @@ -315,7 +315,7 @@ function node_views_data() { 'help' => t('Date in the form of WW (01 - 53).'), 'argument' => array( 'field' => 'created', - 'handler' => 'views_handler_argument_node_created_week', + 'plugin_id' => 'node_created_week', ), ); @@ -324,7 +324,7 @@ function node_views_data() { 'help' => t('Date in the form of CCYYMMDD.'), 'argument' => array( 'field' => 'changed', - 'handler' => 'views_handler_argument_node_created_fulldate', + 'plugin_id' => 'node_created_fulldate', ), ); @@ -333,7 +333,7 @@ function node_views_data() { 'help' => t('Date in the form of YYYYMM.'), 'argument' => array( 'field' => 'changed', - 'handler' => 'views_handler_argument_node_created_year_month', + 'plugin_id' => 'node_created_year_month', ), ); @@ -342,7 +342,7 @@ function node_views_data() { 'help' => t('Date in the form of YYYY.'), 'argument' => array( 'field' => 'changed', - 'handler' => 'views_handler_argument_node_created_year', + 'plugin_id' => 'node_created_year', ), ); @@ -351,7 +351,7 @@ function node_views_data() { 'help' => t('Date in the form of MM (01 - 12).'), 'argument' => array( 'field' => 'changed', - 'handler' => 'views_handler_argument_node_created_month', + 'plugin_id' => 'node_created_month', ), ); @@ -360,7 +360,7 @@ function node_views_data() { 'help' => t('Date in the form of DD (01 - 31).'), 'argument' => array( 'field' => 'changed', - 'handler' => 'views_handler_argument_node_created_day', + 'plugin_id' => 'node_created_day', ), ); @@ -369,7 +369,7 @@ function node_views_data() { 'help' => t('Date in the form of WW (01 - 53).'), 'argument' => array( 'field' => 'changed', - 'handler' => 'views_handler_argument_node_created_week', + 'plugin_id' => 'node_created_week', ), ); @@ -386,13 +386,13 @@ function node_views_data() { 'label' => t('author'), ), 'filter' => array( - 'handler' => 'views_handler_filter_user_name', + 'plugin_id' => 'user_name', ), 'argument' => array( 'plugin_id' => 'numeric', ), 'field' => array( - 'handler' => 'views_handler_field_user', + 'plugin_id' => 'user', ), ); @@ -401,10 +401,10 @@ function node_views_data() { 'help' => t('All nodes where a certain user has a revision'), 'real field' => 'nid', 'filter' => array( - 'handler' => 'views_handler_filter_node_uid_revision', + 'plugin_id' => 'node_uid_revision', ), 'argument' => array( - 'handler' => 'views_handler_argument_node_uid_revision', + 'plugin_id' => 'node_uid_revision', ), ); @@ -467,7 +467,7 @@ function node_views_data() { ), // Information for accepting a nid as an argument 'argument' => array( - 'handler' => 'views_handler_argument_node_vid', + 'plugin_id' => 'node_vid', 'click sortable' => TRUE, 'numeric' => TRUE, ), @@ -495,7 +495,7 @@ function node_views_data() { // Information for displaying a title as a field 'field' => array( 'field' => 'title', // the real field - 'handler' => 'views_handler_field_node_revision', + 'plugin_id' => 'node_revision', 'click sortable' => TRUE, ), 'sort' => array( @@ -543,7 +543,7 @@ function node_views_data() { 'field' => array( 'title' => t('Link'), 'help' => t('Provide a simple link to the revision.'), - 'handler' => 'views_handler_field_node_revision_link', + 'plugin_id' => 'node_revision_link', ), ); @@ -551,7 +551,7 @@ function node_views_data() { 'field' => array( 'title' => t('Revert link'), 'help' => t('Provide a simple link to revert to the revision.'), - 'handler' => 'views_handler_field_node_revision_link_revert', + 'plugin_id' => 'node_revision_link_revert', ), ); @@ -559,7 +559,7 @@ function node_views_data() { 'field' => array( 'title' => t('Delete link'), 'help' => t('Provide a simple link to delete the content revision.'), - 'handler' => 'views_handler_field_node_revision_link_delete', + 'plugin_id' => 'node_revision_link_delete', ), ); @@ -583,7 +583,7 @@ function node_views_data() { 'title' => t('Access'), 'help' => t('Filter by access.'), 'filter' => array( - 'handler' => 'views_handler_filter_node_access', + 'plugin_id' => 'node_access', 'help' => t('Filter for content by view access. <strong>Not necessary if you are using node as your base table.</strong>'), ), ); @@ -613,12 +613,12 @@ function node_views_data() { $data['history']['timestamp'] = array( 'title' => t('Has new content'), 'field' => array( - 'handler' => 'views_handler_field_history_user_timestamp', + 'plugin_id' => 'node_history_user_timestamp', 'help' => t('Show a marker if the content is new or updated.'), ), 'filter' => array( 'help' => t('Show only content that is new or updated.'), - 'handler' => 'views_handler_filter_history_user_timestamp', + 'plugin_id' => 'node_history_user_timestamp', ), ); return $data;