Commit 45768154 authored by dawehner's avatar dawehner Committed by tim.plunkett
Browse files

use the right base class for all handlers

parent 3ccb1139
......@@ -8,6 +8,7 @@
namespace Drupal\views\Plugins\views\filter;
use Drupal\views\Plugins\views\Plugin;
use Drupal\views\Plugins\views\Handler;
/**
* @defgroup views_filter_handlers Views filter handlers
......@@ -35,7 +36,7 @@
*
* @ingroup views_filter_handlers
*/
class FilterPluginBase extends Plugin {
class FilterPluginBase extends Handler {
/**
* Contains the actual value of the field,either configured in the views ui
* or entered in the exposed filters.
......@@ -723,7 +724,7 @@ function can_group() {
*
* @ingroup views_filter_handlers
*/
class views_handler_filter_broken extends views_handler_filter {
class views_handler_filter_broken extends FilterPluginBase {
function ui_name($short = FALSE) {
return t('Broken/missing handler');
}
......
......@@ -5,12 +5,14 @@
* Definition of views_handler_argument_aggregator_category_cid.
*/
use Drupal\views\Plugins\views\argument\Numeric;
/**
* Argument handler to accept an aggregator category id.
*
* @ingroup views_argument_handlers
*/
class views_handler_argument_aggregator_category_cid extends views_handler_argument_numeric {
class views_handler_argument_aggregator_category_cid extends Numeric {
/**
* Override the behavior of title(). Get the title of the category.
*/
......
......@@ -5,12 +5,14 @@
* Definition of views_handler_argument_aggregator_fid.
*/
use Drupal\views\Plugins\views\argument\Numeric;
/**
* Argument handler to accept an aggregator feed id.
*
* @ingroup views_argument_handlers
*/
class views_handler_argument_aggregator_fid extends views_handler_argument_numeric {
class views_handler_argument_aggregator_fid extends Numeric {
/**
* Override the behavior of title(). Get the title of the feed.
*/
......
......@@ -5,12 +5,14 @@
* Definition of views_handler_argument_aggregator_iid.
*/
use Drupal\views\Plugins\views\argument\Numeric;
/**
* Argument handler to accept an aggregator item id.
*
* @ingroup views_argument_handlers
*/
class views_handler_argument_aggregator_iid extends views_handler_argument_numeric {
class views_handler_argument_aggregator_iid extends Numeric {
/**
* Override the behavior of title(). Get the title of the category.
*/
......
......@@ -5,13 +5,15 @@
* Definition of views_handler_field_aggregator_category.
*/
use Drupal\views\Plugins\views\field\FieldPluginBase;
/**
* Field handler to provide simple renderer that allows linking to aggregator
* category.
*
* @ingroup views_field_handlers
*/
class views_handler_field_aggregator_category extends views_handler_field {
class views_handler_field_aggregator_category extends FieldPluginBase {
/**
* Constructor to provide additional field to add.
*/
......
......@@ -5,13 +5,15 @@
* Definition of views_handler_field_aggregator_title_link.
*/
use Drupal\views\Plugins\views\field\FieldPluginBase;
/**
* Field handler that turns an item's title into a clickable link to the original
* source article.
*
* @ingroup views_field_handlers
*/
class views_handler_field_aggregator_title_link extends views_handler_field {
class views_handler_field_aggregator_title_link extends FieldPluginBase {
function construct() {
parent::construct();
$this->additional_fields['link'] = 'link';
......
......@@ -5,12 +5,14 @@
* Definition of views_handler_field_aggregator_xss.
*/
use Drupal\views\Plugins\views\field\FieldPluginBase;
/**
* Filters htmls tags from item.
*
* @ingroup views_field_handlers
*/
class views_handler_field_aggregator_xss extends views_handler_field {
class views_handler_field_aggregator_xss extends FieldPluginBase {
function render($values) {
$value = $this->get_value($values);
return aggregator_filter_xss($value);
......
......@@ -5,12 +5,14 @@
* Definition of views_handler_filter_aggregator_category_cid.
*/
use Drupal\views\Plugins\views\filter\InOperator;
/**
* Filter by aggregator category cid
*
* @ingroup views_filter_handlers
*/
class views_handler_filter_aggregator_category_cid extends views_handler_filter_in_operator {
class views_handler_filter_aggregator_category_cid extends InOperator {
function get_value_options() {
if (isset($this->value_options)) {
return;
......
......@@ -5,10 +5,12 @@
* Contains the Aggregator Item RSS row style plugin.
*/
use Drupal\views\Plugins\views\row\RowPluginBase;
/**
* Plugin which loads an aggregator item and formats it as an RSS item.
*/
class views_plugin_row_aggregator_rss extends views_plugin_row {
class views_plugin_row_aggregator_rss extends RowPluginBase {
var $base_table = 'aggregator_item';
var $base_field = 'iid';
......
......@@ -4,10 +4,12 @@
* Contains the book root from current node argument default plugin.
*/
use Drupal\views\Plugins\views\argument_default\Node;
/**
* Default argument plugin to get the current node's book root.
*/
class views_plugin_argument_default_book_root extends views_plugin_argument_default_node {
class views_plugin_argument_default_book_root extends Node {
function get_argument() {
// Use the argument_default_node plugin to get the nid argument.
$nid = parent::get_argument();
......
......@@ -5,12 +5,14 @@
* Definition of views_handler_field_comment.
*/
use Drupal\views\Plugins\views\field\FieldPluginBase;
/**
* Field handler to allow linking to a comment.
*
* @ingroup views_field_handlers
*/
class views_handler_field_comment extends views_handler_field {
class views_handler_field_comment extends FieldPluginBase {
/**
* Override init function to provide generic option to link to comment.
*/
......
......@@ -5,12 +5,14 @@
* Definition of views_handler_field_node_comment.
*/
use Drupal\views\Plugins\views\field\FieldPluginBase;
/**
* Display node comment status.
*
* @ingroup views_field_handlers
*/
class views_handler_field_node_comment extends views_handler_field {
class views_handler_field_node_comment extends FieldPluginBase {
function render($values) {
$value = $this->get_value($values);
switch ($value) {
......
......@@ -5,12 +5,14 @@
* Definition of views_handler_field_node_new_comments.
*/
use Drupal\views\Plugins\views\field\Numeric;
/**
* Field handler to display the number of new comments.
*
* @ingroup views_field_handlers
*/
class views_handler_field_node_new_comments extends views_handler_field_numeric {
class views_handler_field_node_new_comments extends Numeric {
function init(&$view, &$options) {
parent::init($view, $options);
......
......@@ -5,12 +5,14 @@
* Definition of views_handler_filter_ncs_last_updated.
*/
use Drupal\views\Plugins\views\filter\Date;
/**
* Filter handler for the newer of last comment / node updated.
*
* @ingroup views_filter_handlers
*/
class views_handler_filter_ncs_last_updated extends views_handler_filter_date {
class views_handler_filter_ncs_last_updated extends Date {
function query() {
$this->ensure_my_table();
$this->node_table = $this->query->ensure_table('node', $this->relationship);
......
......@@ -5,12 +5,14 @@
* Definition of views_handler_filter_node_comment.
*/
use Drupal\views\Plugins\views\filter\InOperator;
/**
* Filter based on comment node status.
*
* @ingroup views_filter_handlers
*/
class views_handler_filter_node_comment extends views_handler_filter_in_operator {
class views_handler_filter_node_comment extends InOperator {
function get_value_options() {
$this->value_options = array(
COMMENT_NODE_HIDDEN => t('Hidden'),
......
......@@ -5,12 +5,14 @@
* Definition of views_handler_sort_comment_thread.
*/
use Drupal\views\Plugins\views\sort\SortPluginBase;
/**
* Sort handler for ordering by thread.
*
* @ingroup views_sort_handlers
*/
class views_handler_sort_comment_thread extends views_handler_sort {
class views_handler_sort_comment_thread extends SortPluginBase {
function query() {
$this->ensure_my_table();
......
......@@ -6,6 +6,8 @@
*/
use Drupal\views\Join;
use Drupal\views\Plugins\views\sort\SortPluginBase;
/**
* Sort handler to sort by last comment name which might be in 2 different
......@@ -13,7 +15,7 @@
*
* @ingroup views_sort_handlers
*/
class views_handler_sort_ncs_last_comment_name extends views_handler_sort {
class views_handler_sort_ncs_last_comment_name extends SortPluginBase {
function query() {
$this->ensure_my_table();
$join = new Join();
......
......@@ -5,12 +5,15 @@
* Definition of views_handler_sort_ncs_last_updated.
*/
use Drupal\views\Plugins\views\sort\Date;
/**
* Sort handler for the newer of last comment / node updated.
*
* @ingroup views_sort_handlers
*/
class views_handler_sort_ncs_last_updated extends views_handler_sort_date {
class views_handler_sort_ncs_last_updated extends Date {
function query() {
$this->ensure_my_table();
$this->node_table = $this->query->ensure_table('node', $this->relationship);
......
......@@ -5,10 +5,12 @@
* Contains the comment RSS row style plugin.
*/
use Drupal\views\Plugins\views\row\RowPluginBase;
/**
* Plugin which formats the comments as RSS items.
*/
class views_plugin_row_comment_rss extends views_plugin_row {
class views_plugin_row_comment_rss extends RowPluginBase {
var $base_table = 'comment';
var $base_field = 'cid';
......
......@@ -5,10 +5,12 @@
* Contains the node RSS row style plugin.
*/
use Drupal\views\Plugins\views\row\RowPluginBase;
/**
* Plugin which performs a comment_view on the resulting object.
*/
class views_plugin_row_comment_view extends views_plugin_row {
class views_plugin_row_comment_view extends RowPluginBase {
var $base_field = 'cid';
var $base_table = 'comment';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment