Commit 3ccb1139 authored by dawehner's avatar dawehner Committed by tim.plunkett

move the old handler code into the handler class

parent 953de7e4
This diff is collapsed.
......@@ -12,6 +12,11 @@
use Drupal\views\Plugin\PluginInterface;
abstract class Plugin extends PluginBase {
public function __construct(array $configuration, $plugin_id) {
$this->configuration = $configuration;
$this->plugin_id = $plugin_id;
}
/**
* Except for displays, options for the object will be held here.
*/
......
......@@ -5,6 +5,8 @@
* Definition of views_handler_filter_history_user_timestamp.
*/
use Drupal\views\Plugins\views\filter\FilterPluginBase;
/**
* Filter for new content.
*
......@@ -13,7 +15,7 @@
*
* @ingroup views_filter_handlers
*/
class views_handler_filter_history_user_timestamp extends views_handler_filter {
class views_handler_filter_history_user_timestamp extends FilterPluginBase {
// Don't display empty space where the operator would be.
var $no_operator = TRUE;
......
......@@ -5,12 +5,15 @@
* Definition of views_handler_filter_node_access.
*/
use Drupal\views\Plugins\views\filter\FilterPluginBase;
/**
* Filter by node_access records.
*
* @ingroup views_filter_handlers
*/
class views_handler_filter_node_access extends views_handler_filter {
class views_handler_filter_node_access extends FilterPluginBase {
function admin_summary() { }
function operator_form(&$form, &$form_state) { }
function can_expose() {
......
......@@ -5,12 +5,14 @@
* Definition of views_handler_filter_node_status.
*/
use Drupal\views\Plugins\views\filter\FilterPluginBase;
/**
* Filter by published status.
*
* @ingroup views_filter_handlers
*/
class views_handler_filter_node_status extends views_handler_filter {
class views_handler_filter_node_status extends FilterPluginBase {
function admin_summary() { }
function operator_form(&$form, &$form_state) { }
function can_expose() { return FALSE; }
......
......@@ -5,12 +5,14 @@
* Definition of views_handler_filter_node_type.
*/
use Drupal\views\Plugins\views\filter\InOperator;
/**
* Filter by node type.
*
* @ingroup views_filter_handlers
*/
class views_handler_filter_node_type extends views_handler_filter_in_operator {
class views_handler_filter_node_type extends InOperator {
function get_value_options() {
if (!isset($this->value_options)) {
$this->value_title = t('Content types');
......
......@@ -5,12 +5,14 @@
* Contains the node from URL argument default plugin.
*/
use Drupal\views\Plugins\views\argument_default\ArgumentDefaultPluginBase;
/**
* Default argument plugin to extract a node via menu_get_object
*
* This plugin actually has no options so it odes not need to do a great deal.
*/
class views_plugin_argument_default_node extends views_plugin_argument_default {
class views_plugin_argument_default_node extends ArgumentDefaultPluginBase {
function get_argument() {
foreach (range(1, 3) as $i) {
$node = menu_get_object('node', $i);
......
......@@ -5,10 +5,12 @@
* Contains the 'node' argument validator plugin.
*/
use Drupal\views\Plugins\views\argument_validator\ArgumentValidatorPluginBase;
/**
* Validate whether an argument is an acceptable node.
*/
class views_plugin_argument_validate_node extends views_plugin_argument_validate {
class views_plugin_argument_validate_node extends ArgumentValidatorPluginBase {
function option_definition() {
$options = parent::option_definition();
$options['types'] = array('default' => array());
......
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