Commit e5d6c142 authored by alexpott's avatar alexpott

Issue #2455415 by rteijeiro, hussainweb, rpayanm, baisong: Rename Views plugin...

Issue #2455415 by rteijeiro, hussainweb, rpayanm, baisong: Rename Views plugin classes to support PHP 7
parent 4a7ab3e4
......@@ -8,7 +8,7 @@
namespace Drupal\aggregator\Plugin\views\argument;
use Drupal\Core\Entity\EntityManagerInterface;
use Drupal\views\Plugin\views\argument\Numeric;
use Drupal\views\Plugin\views\argument\NumericArgument;
use Drupal\Component\Utility\String;
use Symfony\Component\DependencyInjection\ContainerInterface;
......@@ -19,7 +19,7 @@
*
* @ViewsArgument("aggregator_fid")
*/
class Fid extends Numeric {
class Fid extends NumericArgument {
/**
* The entity manager service.
......
......@@ -8,7 +8,7 @@
namespace Drupal\aggregator\Plugin\views\argument;
use Drupal\Core\Entity\EntityManagerInterface;
use Drupal\views\Plugin\views\argument\Numeric;
use Drupal\views\Plugin\views\argument\NumericArgument;
use Drupal\Component\Utility\String;
use Symfony\Component\DependencyInjection\ContainerInterface;
......@@ -19,7 +19,7 @@
*
* @ViewsArgument("aggregator_iid")
*/
class Iid extends Numeric {
class Iid extends NumericArgument {
/**
* The entity manager service.
......
......@@ -10,7 +10,7 @@
use Drupal\Core\Database\Connection;
use Drupal\comment\CommentInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\views\Plugin\views\field\Numeric;
use Drupal\views\Plugin\views\field\NumericField;
use Drupal\views\Plugin\views\display\DisplayPluginBase;
use Drupal\views\ResultRow;
use Drupal\views\ViewExecutable;
......@@ -23,7 +23,7 @@
*
* @ViewsField("node_new_comments")
*/
class NodeNewComments extends Numeric {
class NodeNewComments extends NumericField {
/**
* {@inheritdoc}
......
......@@ -9,7 +9,7 @@
use Drupal\Core\Entity\EntityManagerInterface;
use Drupal\Core\Entity\Query\QueryFactory;
use Drupal\views\Plugin\views\argument\Numeric;
use Drupal\views\Plugin\views\argument\NumericArgument;
use Drupal\Component\Utility\String;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
......@@ -21,7 +21,7 @@
*
* @ViewsArgument("file_fid")
*/
class Fid extends Numeric implements ContainerFactoryPluginInterface {
class Fid extends NumericArgument implements ContainerFactoryPluginInterface {
/**
* The entity manager service
......
......@@ -9,7 +9,7 @@
use Drupal\Component\Utility\String;
use Drupal\node\NodeStorageInterface;
use Drupal\views\Plugin\views\argument\Numeric;
use Drupal\views\Plugin\views\argument\NumericArgument;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
......@@ -17,7 +17,7 @@
*
* @ViewsArgument("node_nid")
*/
class Nid extends Numeric {
class Nid extends NumericArgument {
/**
* The node storage.
......
......@@ -9,7 +9,7 @@
use Drupal\Component\Utility\String as UtilityString;
use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\views\Plugin\views\argument\String;
use Drupal\views\Plugin\views\argument\StringArgument;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
......@@ -17,7 +17,7 @@
*
* @ViewsArgument("node_type")
*/
class Type extends String {
class Type extends StringArgument {
/**
* NodeType storage controller.
......
......@@ -9,7 +9,7 @@
use Drupal\Component\Utility\String;
use Drupal\Core\Database\Connection;
use Drupal\views\Plugin\views\argument\Numeric;
use Drupal\views\Plugin\views\argument\NumericArgument;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Drupal\node\NodeStorageInterface;
......@@ -18,7 +18,7 @@
*
* @ViewsArgument("node_vid")
*/
class Vid extends Numeric {
class Vid extends NumericArgument {
/**
* Database Service Object.
......
......@@ -13,7 +13,7 @@
use Drupal\views\FieldAPIHandlerTrait;
use Drupal\views\ViewExecutable;
use Drupal\views\Plugin\views\display\DisplayPluginBase;
use Drupal\views\Plugin\views\argument\Numeric;
use Drupal\views\Plugin\views\argument\NumericArgument;
/**
* Argument handler for list field to show the human readable name in the
......@@ -23,7 +23,7 @@
*
* @ViewsArgument("number_list_field")
*/
class NumberListField extends Numeric {
class NumberListField extends NumericArgument {
use AllowedTagsXssTrait;
use FieldAPIHandlerTrait;
......
......@@ -12,7 +12,7 @@
use Drupal\views\FieldAPIHandlerTrait;
use Drupal\views\ViewExecutable;
use Drupal\views\Plugin\views\display\DisplayPluginBase;
use Drupal\views\Plugin\views\argument\String;
use Drupal\views\Plugin\views\argument\StringArgument;
use Drupal\Component\Utility\String as StringUtility;
/**
......@@ -22,7 +22,7 @@
*
* @ViewsArgument("string_list_field")
*/
class StringListField extends String {
class StringListField extends StringArgument {
use AllowedTagsXssTrait;
use FieldAPIHandlerTrait;
......
......@@ -7,7 +7,7 @@
namespace Drupal\search\Plugin\views\field;
use Drupal\views\Plugin\views\field\Numeric;
use Drupal\views\Plugin\views\field\NumericField;
use Drupal\views\ResultRow;
/**
......@@ -17,7 +17,7 @@
*
* @ViewsField("search_score")
*/
class Score extends Numeric {
class Score extends NumericField {
/**
* {@inheritdoc}
......
......@@ -9,7 +9,7 @@
use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\views\Plugin\views\argument\Numeric;
use Drupal\views\Plugin\views\argument\NumericArgument;
use Drupal\Component\Utility\String;
use Symfony\Component\DependencyInjection\ContainerInterface;
......@@ -20,7 +20,7 @@
*
* @ViewsArgument("taxonomy")
*/
class Taxonomy extends Numeric implements ContainerFactoryPluginInterface {
class Taxonomy extends NumericArgument implements ContainerFactoryPluginInterface {
/**
* @var EntityStorageInterface
......
......@@ -7,7 +7,7 @@
namespace Drupal\taxonomy\Plugin\views\argument;
use Drupal\views\Plugin\views\argument\Numeric;
use Drupal\views\Plugin\views\argument\NumericArgument;
use Drupal\Component\Utility\String;
use Drupal\taxonomy\VocabularyStorageInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
......@@ -19,7 +19,7 @@
*
* @ViewsArgument("vocabulary_vid")
*/
class VocabularyVid extends Numeric {
class VocabularyVid extends NumericArgument {
/**
* The vocabulary storage.
......
......@@ -9,7 +9,7 @@
use Drupal\Component\Utility\String;
use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\views\Plugin\views\argument\Numeric;
use Drupal\views\Plugin\views\argument\NumericArgument;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
......@@ -19,7 +19,7 @@
*
* @ViewsArgument("user_uid")
*/
class Uid extends Numeric {
class Uid extends NumericArgument {
/**
* The user storage.
......
......@@ -12,7 +12,7 @@
use Drupal\Core\Form\FormStateInterface;
use Drupal\views\ViewExecutable;
use Drupal\views\Plugin\views\display\DisplayPluginBase;
use Drupal\views\Plugin\views\argument\Numeric;
use Drupal\views\Plugin\views\argument\NumericArgument;
/**
* Argument handler for list field to show the human readable name in the
......@@ -22,7 +22,7 @@
*
* @ViewsArgument("field_list")
*/
class FieldList extends Numeric {
class FieldList extends NumericArgument {
use AllowedTagsXssTrait;
......
......@@ -12,7 +12,7 @@
use Drupal\Core\Form\FormStateInterface;
use Drupal\views\ViewExecutable;
use Drupal\views\Plugin\views\display\DisplayPluginBase;
use Drupal\views\Plugin\views\argument\String;
use Drupal\views\Plugin\views\argument\StringArgument;
/**
* Argument handler for list field to show the human readable name in the
......@@ -22,7 +22,7 @@
*
* @ViewsArgument("field_list_string")
*/
class ListString extends String {
class ListString extends StringArgument {
use AllowedTagsXssTrait;
......@@ -34,7 +34,7 @@ class ListString extends String {
var $allowed_values = NULL;
/**
* Overrides \Drupal\views\Plugin\views\argument\String::init().
* Overrides \Drupal\views\Plugin\views\argument\StringArgument::init().
*/
public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) {
parent::init($view, $display, $options);
......
......@@ -2,7 +2,7 @@
/**
* @file
* Definition of Drupal\views\Plugin\views\argument\Null.
* Contains \Drupal\views\Plugin\views\argument\NullArgument.
*/
namespace Drupal\views\Plugin\views\argument;
......@@ -16,7 +16,7 @@
*
* @ViewsArgument("null")
*/
class Null extends ArgumentPluginBase {
class NullArgument extends ArgumentPluginBase {
protected function defineOptions() {
$options = parent::defineOptions();
......
......@@ -2,7 +2,7 @@
/**
* @file
* Definition of Drupal\views\Plugin\views\argument\Numeric.
* Contains \Drupal\views\Plugin\views\argument\NumericArgument.
*/
namespace Drupal\views\Plugin\views\argument;
......@@ -17,7 +17,7 @@
*
* @ViewsArgument("numeric")
*/
class Numeric extends ArgumentPluginBase {
class NumericArgument extends ArgumentPluginBase {
/**
* The operator used for the query: or|and.
......
......@@ -2,7 +2,7 @@
/**
* @file
* Definition of Drupal\views\Plugin\views\argument\String.
* Contains \Drupal\views\Plugin\views\argument\StringArgument.
*/
namespace Drupal\views\Plugin\views\argument;
......@@ -20,7 +20,7 @@
*
* @ViewsArgument("string")
*/
class String extends ArgumentPluginBase {
class StringArgument extends ArgumentPluginBase {
/**
* Overrides \Drupal\views\Plugin\views\argument\ArgumentPluginBase::init().
......
......@@ -2,7 +2,7 @@
/**
* @file
* Definition of Drupal\views\Plugin\views\argument_validator\Numeric.
* Contains \Drupal\views\Plugin\views\argument_validator\NumericArgumentValidator.
*/
namespace Drupal\views\Plugin\views\argument_validator;
......@@ -17,7 +17,7 @@
* title = @Translation("Numeric")
* )
*/
class Numeric extends ArgumentValidatorPluginBase {
class NumericArgumentValidator extends ArgumentValidatorPluginBase {
public function validateArgument($argument) {
return is_numeric($argument);
......
......@@ -2,7 +2,7 @@
/**
* @file
* Definition of Drupal\views\Plugin\views\field\Numeric.
* Contains \Drupal\views\Plugin\views\field\NumericField.
*/
namespace Drupal\views\Plugin\views\field;
......@@ -21,7 +21,7 @@
*
* @ViewsField("numeric")
*/
class Numeric extends FieldPluginBase {
class NumericField extends FieldPluginBase {
/**
* {@inheritdoc}
......
......@@ -16,7 +16,7 @@
*
* @ViewsFilter("combine")
*/
class Combine extends String {
class Combine extends StringFilter {
/**
* @var views_plugin_query_default
......
......@@ -16,7 +16,7 @@
*
* @ViewsFilter("date")
*/
class Date extends Numeric {
class Date extends NumericFilter {
protected function defineOptions() {
$options = parent::defineOptions();
......
......@@ -14,7 +14,7 @@
*
* @ViewsFilter("groupby_numeric")
*/
class GroupByNumeric extends Numeric {
class GroupByNumeric extends NumericFilter {
public function query() {
$this->ensureMyTable();
......
......@@ -2,7 +2,7 @@
/**
* @file
* Definition of Drupal\views\Plugin\views\filter\Numeric.
* Contains \Drupal\views\Plugin\views\filter\NumericFilter.
*/
namespace Drupal\views\Plugin\views\filter;
......@@ -18,7 +18,7 @@
*
* @ViewsFilter("numeric")
*/
class Numeric extends FilterPluginBase {
class NumericFilter extends FilterPluginBase {
protected $alwaysMultiple = TRUE;
......
......@@ -2,7 +2,7 @@
/**
* @file
* Definition of Drupal\views\Plugin\views\filter\String.
* Contains \Drupal\views\Plugin\views\filter\StringFilter.
*/
namespace Drupal\views\Plugin\views\filter;
......@@ -19,7 +19,7 @@
*
* @ViewsFilter("string")
*/
class String extends FilterPluginBase {
class StringFilter extends FilterPluginBase {
// exposed filter options
protected $alwaysMultiple = TRUE;
......
......@@ -11,7 +11,7 @@
use Drupal\views\Views;
/**
* Tests the core Drupal\views\Plugin\views\argument\Null handler.
* Tests the core Drupal\views\Plugin\views\argument\NullArgument handler.
*
* @group views
*/
......
......@@ -10,7 +10,7 @@
use Drupal\views\Views;
/**
* Tests the core Drupal\views\Plugin\views\argument\String handler.
* Tests the core Drupal\views\Plugin\views\argument\StringArgument handler.
*
* @group views
*/
......
......@@ -11,7 +11,7 @@
use Drupal\views\Views;
/**
* Tests the core Drupal\views\Plugin\views\filter\String handler.
* Tests the core Drupal\views\Plugin\views\filter\StringFilter handler.
*
* @group views
*/
......
......@@ -8,7 +8,7 @@
namespace Drupal\views_test_data\Plugin\views\style;
use Drupal\views\Plugin\views\style\Mapping;
use Drupal\views\Plugin\views\field\Numeric;
use Drupal\views\Plugin\views\field\NumericField;
/**
* Provides a test plugin for the mapping style.
......@@ -59,7 +59,7 @@ protected function defineMapping() {
*/
protected function filterNumericFields(&$fields) {
foreach ($this->view->field as $id => $field) {
if (!($field instanceof Numeric)) {
if (!($field instanceof NumericField)) {
unset($fields[$id]);
}
}
......
......@@ -13,7 +13,7 @@
* Tests the numeric filter UI.
*
* @group views_ui
* @see \Drupal\views\Plugin\views\filter\Numeric
* @see \Drupal\views\Plugin\views\filter\NumericFilter
*/
class FilterNumericWebTest extends UITestBase {
use SchemaCheckTestTrait;
......
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