Issue #2455415 by rteijeiro, hussainweb, rpayanm, baisong: Rename Views plugin classes to support PHP 7
parent
4a7ab3e408
commit
e5d6c142ff
|
@ -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 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
|||
*
|
||||
* @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 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
|||
*
|
||||
* @ViewsArgument("aggregator_iid")
|
||||
*/
|
||||
class Iid extends Numeric {
|
||||
class Iid extends NumericArgument {
|
||||
|
||||
/**
|
||||
* The entity manager service.
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace Drupal\comment\Plugin\views\field;
|
|||
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 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
|||
*
|
||||
* @ViewsField("node_new_comments")
|
||||
*/
|
||||
class NodeNewComments extends Numeric {
|
||||
class NodeNewComments extends NumericField {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace Drupal\file\Plugin\views\argument;
|
|||
|
||||
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 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
|||
*
|
||||
* @ViewsArgument("file_fid")
|
||||
*/
|
||||
class Fid extends Numeric implements ContainerFactoryPluginInterface {
|
||||
class Fid extends NumericArgument implements ContainerFactoryPluginInterface {
|
||||
|
||||
/**
|
||||
* The entity manager service
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace Drupal\node\Plugin\views\argument;
|
|||
|
||||
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 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
|||
*
|
||||
* @ViewsArgument("node_nid")
|
||||
*/
|
||||
class Nid extends Numeric {
|
||||
class Nid extends NumericArgument {
|
||||
|
||||
/**
|
||||
* The node storage.
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace Drupal\node\Plugin\views\argument;
|
|||
|
||||
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 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
|||
*
|
||||
* @ViewsArgument("node_type")
|
||||
*/
|
||||
class Type extends String {
|
||||
class Type extends StringArgument {
|
||||
|
||||
/**
|
||||
* NodeType storage controller.
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace Drupal\node\Plugin\views\argument;
|
|||
|
||||
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 @@ use Drupal\node\NodeStorageInterface;
|
|||
*
|
||||
* @ViewsArgument("node_vid")
|
||||
*/
|
||||
class Vid extends Numeric {
|
||||
class Vid extends NumericArgument {
|
||||
|
||||
/**
|
||||
* Database Service Object.
|
||||
|
|
|
@ -13,7 +13,7 @@ use Drupal\Core\Form\FormStateInterface;
|
|||
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 @@ use Drupal\views\Plugin\views\argument\Numeric;
|
|||
*
|
||||
* @ViewsArgument("number_list_field")
|
||||
*/
|
||||
class NumberListField extends Numeric {
|
||||
class NumberListField extends NumericArgument {
|
||||
|
||||
use AllowedTagsXssTrait;
|
||||
use FieldAPIHandlerTrait;
|
||||
|
|
|
@ -12,7 +12,7 @@ use Drupal\Core\Form\FormStateInterface;
|
|||
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 @@ use Drupal\Component\Utility\String as StringUtility;
|
|||
*
|
||||
* @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 @@ use Drupal\views\ResultRow;
|
|||
*
|
||||
* @ViewsField("search_score")
|
||||
*/
|
||||
class Score extends Numeric {
|
||||
class Score extends NumericField {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace Drupal\taxonomy\Plugin\views\argument;
|
|||
|
||||
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 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
|||
*
|
||||
* @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 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
|||
*
|
||||
* @ViewsArgument("vocabulary_vid")
|
||||
*/
|
||||
class VocabularyVid extends Numeric {
|
||||
class VocabularyVid extends NumericArgument {
|
||||
|
||||
/**
|
||||
* The vocabulary storage.
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace Drupal\user\Plugin\views\argument;
|
|||
|
||||
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 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
|||
*
|
||||
* @ViewsArgument("user_uid")
|
||||
*/
|
||||
class Uid extends Numeric {
|
||||
class Uid extends NumericArgument {
|
||||
|
||||
/**
|
||||
* The user storage.
|
||||
|
|
|
@ -12,7 +12,7 @@ use Drupal\Core\Field\AllowedTagsXssTrait;
|
|||
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 @@ use Drupal\views\Plugin\views\argument\Numeric;
|
|||
*
|
||||
* @ViewsArgument("field_list")
|
||||
*/
|
||||
class FieldList extends Numeric {
|
||||
class FieldList extends NumericArgument {
|
||||
|
||||
use AllowedTagsXssTrait;
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ use Drupal\Core\Field\AllowedTagsXssTrait;
|
|||
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 @@ use Drupal\views\Plugin\views\argument\String;
|
|||
*
|
||||
* @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 @@ use Drupal\Core\Form\FormStateInterface;
|
|||
*
|
||||
* @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 @@ use Drupal\Core\Form\FormStateInterface;
|
|||
*
|
||||
* @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 @@ use Drupal\views\ManyToOneHelper;
|
|||
*
|
||||
* @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 @@ namespace Drupal\views\Plugin\views\argument_validator;
|
|||
* 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 @@ use Drupal\views\ResultRow;
|
|||
*
|
||||
* @ViewsField("numeric")
|
||||
*/
|
||||
class Numeric extends FieldPluginBase {
|
||||
class NumericField extends FieldPluginBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
|
@ -16,7 +16,7 @@ use Drupal\Core\Form\FormStateInterface;
|
|||
*
|
||||
* @ViewsFilter("combine")
|
||||
*/
|
||||
class Combine extends String {
|
||||
class Combine extends StringFilter {
|
||||
|
||||
/**
|
||||
* @var views_plugin_query_default
|
||||
|
|
|
@ -16,7 +16,7 @@ use Drupal\Core\Form\FormStateInterface;
|
|||
*
|
||||
* @ViewsFilter("date")
|
||||
*/
|
||||
class Date extends Numeric {
|
||||
class Date extends NumericFilter {
|
||||
|
||||
protected function defineOptions() {
|
||||
$options = parent::defineOptions();
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace Drupal\views\Plugin\views\filter;
|
|||
*
|
||||
* @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 @@ use Drupal\Core\Form\FormStateInterface;
|
|||
*
|
||||
* @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 @@ use Drupal\Core\Form\FormStateInterface;
|
|||
*
|
||||
* @ViewsFilter("string")
|
||||
*/
|
||||
class String extends FilterPluginBase {
|
||||
class StringFilter extends FilterPluginBase {
|
||||
|
||||
// exposed filter options
|
||||
protected $alwaysMultiple = TRUE;
|
|
@ -11,7 +11,7 @@ use Drupal\views\Tests\ViewUnitTestBase;
|
|||
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 @@ namespace Drupal\views\Tests\Handler;
|
|||
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\Tests\ViewUnitTestBase;
|
|||
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 @@ class MappingTest extends Mapping {
|
|||
*/
|
||||
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 @@ use Drupal\config\Tests\SchemaCheckTestTrait;
|
|||
* 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;
|
||||
|
|
Loading…
Reference in New Issue