Skip to content
Snippets Groups Projects
Verified Commit 2ed3680d authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3426957 by sorlov, smustgrave, mstrelan: Convert ViewsFilter plugin discovery to attributes

(cherry picked from commit 8aa3632c)
parent fc15d5ee
Branches
Tags
28 merge requests!11958Issue #3490507 by alexpott, smustgrave: Fix bogus mocking in...,!11769Issue #3517987: Add option to contextual filters to encode slashes in query parameter.,!11185Issue #3477324 by andypost, alexpott: Fix usage of str_getcsv() and fgetcsv() for PHP 8.4,!10602Issue #3438769 by vinmayiswamy, antonnavi, michelle, amateescu: Sub workspace does not clear,!10301Issue #3469309 by mstrelan, smustgrave, moshe weitzman: Use one-time login...,!10187Issue #3487488 by dakwamine: ExtensionMimeTypeGuesser::guessMimeType must support file names with "0" (zero) like foo.0.zip,!9944Issue #3483353: Consider making the createCopy config action optionally fail...,!9929Issue #3445469 by pooja_sharma, smustgrave: Add additional test coverage for...,!9787Resolve issue 3479427 - bootstrap barrio issue under Windows,!9742Issue #3463908 by catch, quietone: Split OptionsFieldUiTest into two,!9526Issue #3458177 by mondrake, catch, quietone, godotislate, longwave, larowlan,...,!8738Issue #3424162 by camilledavis, dineshkumarbollu, smustgrave: Claro...,!8704Make greek characters available in ckeditor5,!8597Draft: Issue #3442259 by catch, quietone, dww: Reduce time of Migrate Upgrade tests...,!8533Issue #3446962 by kim.pepper: Remove incorrectly added...,!8517Issue #3443748 by NexusNovaz, smustgrave: Testcase creates false positive,!8325Update file Sort.php,!8095Expose document root on install,!7930Resolve #3427374 "Taxonomytid viewsargumentdefault plugin",!7627Issue #3439440 by nicxvan, Binoli Lalani, longwave: Remove country support from DateFormatter,!7445Issue #3440169: When using drupalGet(), provide an associative array for $headers,!7401#3271894 Fix documented StreamWrapperInterface return types for realpath() and dirname(),!7384Add constraints to system.advisories,!7078Issue #3320569 by Spokje, mondrake, smustgrave, longwave, quietone, Lendude,...,!6622Issue #2559833 by piggito, mohit_aghera, larowlan, guptahemant, vakulrai,...,!6502Draft: Resolve #2938524 "Plach testing issue",!38582585169-10.1.x,!3226Issue #2987537: Custom menu link entity type should not declare "bundle" entity key
Showing
with 40 additions and 40 deletions
......@@ -3,15 +3,15 @@
namespace Drupal\comment\Plugin\views\filter;
use Drupal\comment\Plugin\Field\FieldType\CommentItemInterface;
use Drupal\views\Attribute\ViewsFilter;
use Drupal\views\Plugin\views\filter\InOperator;
/**
* Filter based on comment node status.
*
* @ingroup views_filter_handlers
*
* @ViewsFilter("node_comment")
*/
#[ViewsFilter("node_comment")]
class NodeComment extends InOperator {
/**
......
......@@ -2,15 +2,15 @@
namespace Drupal\comment\Plugin\views\filter;
use Drupal\views\Attribute\ViewsFilter;
use Drupal\views\Plugin\views\filter\Date;
/**
* Filter handler for the newer of last comment / node updated.
*
* @ingroup views_filter_handlers
*
* @ViewsFilter("comment_ces_last_updated")
*/
#[ViewsFilter("comment_ces_last_updated")]
class StatisticsLastUpdated extends Date {
/**
......
......@@ -3,15 +3,15 @@
namespace Drupal\comment\Plugin\views\filter;
use Drupal\Core\Database\Database;
use Drupal\views\Attribute\ViewsFilter;
use Drupal\views\Plugin\views\filter\FilterPluginBase;
/**
* Filter handler, accepts user ID to check for nodes user posted/commented on.
*
* @ingroup views_filter_handlers
*
* @ViewsFilter("comment_user_uid")
*/
#[ViewsFilter("comment_user_uid")]
class UserUid extends FilterPluginBase {
public function query() {
......
......@@ -7,6 +7,7 @@
use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Entity\EntityTypeBundleInfoInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\views\Attribute\ViewsFilter;
use Drupal\views\Plugin\DependentWithRemovalPluginInterface;
use Drupal\views\Plugin\views\filter\InOperator;
use Drupal\views\Views;
......@@ -16,9 +17,8 @@
* Provides a filter for the moderation state of an entity.
*
* @ingroup views_filter_handlers
*
* @ViewsFilter("moderation_state_filter")
*/
#[ViewsFilter("moderation_state_filter")]
class ModerationStateFilter extends InOperator implements DependentWithRemovalPluginInterface {
use ModerationStateJoinViewsHandlerTrait;
......
......@@ -7,6 +7,7 @@
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\datetime\Plugin\Field\FieldType\DateTimeItem;
use Drupal\datetime\Plugin\Field\FieldType\DateTimeItemInterface;
use Drupal\views\Attribute\ViewsFilter;
use Drupal\views\FieldAPIHandlerTrait;
use Drupal\views\Plugin\views\filter\Date as NumericDate;
use Symfony\Component\DependencyInjection\ContainerInterface;
......@@ -19,9 +20,8 @@
* because it provides more sensible operators.
*
* @ingroup views_filter_handlers
*
* @ViewsFilter("datetime")
*/
#[ViewsFilter("datetime")]
class Date extends NumericDate implements ContainerFactoryPluginInterface {
use FieldAPIHandlerTrait;
......
......@@ -3,13 +3,13 @@
namespace Drupal\dblog\Plugin\views\filter;
use Drupal\Core\Form\FormStateInterface;
use Drupal\views\Attribute\ViewsFilter;
use Drupal\views\Plugin\views\filter\InOperator;
/**
* Exposes log types to views module.
*
* @ViewsFilter("dblog_types")
*/
#[ViewsFilter("dblog_types")]
class DblogTypes extends InOperator {
/**
......
......@@ -3,15 +3,15 @@
namespace Drupal\file\Plugin\views\filter;
use Drupal\file\FileInterface;
use Drupal\views\Attribute\ViewsFilter;
use Drupal\views\Plugin\views\filter\InOperator;
/**
* Filter by file status.
*
* @ingroup views_filter_handlers
*
* @ViewsFilter("file_status")
*/
#[ViewsFilter("file_status")]
class Status extends InOperator {
public function getValueOptions() {
......
......@@ -5,6 +5,7 @@
use Drupal\Component\Datetime\TimeInterface;
use Drupal\Core\Cache\UncacheableDependencyTrait;
use Drupal\Core\Form\FormStateInterface;
use Drupal\views\Attribute\ViewsFilter;
use Drupal\views\Plugin\views\filter\FilterPluginBase;
use Symfony\Component\DependencyInjection\ContainerInterface;
......@@ -15,9 +16,8 @@
* table is history.
*
* @ingroup views_filter_handlers
*
* @ViewsFilter("history_user_timestamp")
*/
#[ViewsFilter("history_user_timestamp")]
class HistoryUserTimestamp extends FilterPluginBase {
use UncacheableDependencyTrait;
......
......@@ -3,15 +3,15 @@
namespace Drupal\media\Plugin\views\filter;
use Drupal\Core\Form\FormStateInterface;
use Drupal\views\Attribute\ViewsFilter;
use Drupal\views\Plugin\views\filter\FilterPluginBase;
/**
* Filter by published status.
*
* @ingroup views_filter_handlers
*
* @ViewsFilter("media_status")
*/
#[ViewsFilter("media_status")]
class Status extends FilterPluginBase {
/**
......
......@@ -3,15 +3,15 @@
namespace Drupal\node\Plugin\views\filter;
use Drupal\Core\Form\FormStateInterface;
use Drupal\views\Attribute\ViewsFilter;
use Drupal\views\Plugin\views\filter\FilterPluginBase;
/**
* Filter by node_access records.
*
* @ingroup views_filter_handlers
*
* @ViewsFilter("node_access")
*/
#[ViewsFilter("node_access")]
class Access extends FilterPluginBase {
public function adminSummary() {}
......
......@@ -3,15 +3,15 @@
namespace Drupal\node\Plugin\views\filter;
use Drupal\Core\Form\FormStateInterface;
use Drupal\views\Attribute\ViewsFilter;
use Drupal\views\Plugin\views\filter\FilterPluginBase;
/**
* Filter by published status.
*
* @ingroup views_filter_handlers
*
* @ViewsFilter("node_status")
*/
#[ViewsFilter("node_status")]
class Status extends FilterPluginBase {
public function adminSummary() {}
......
......@@ -3,14 +3,14 @@
namespace Drupal\node\Plugin\views\filter;
use Drupal\user\Plugin\views\filter\Name;
use Drupal\views\Attribute\ViewsFilter;
/**
* Filter handler to check for revisions a certain user has created.
*
* @ingroup views_filter_handlers
*
* @ViewsFilter("node_uid_revision")
*/
#[ViewsFilter("node_uid_revision")]
class UidRevision extends Name {
public function query($group_by = FALSE) {
......
......@@ -2,6 +2,7 @@
namespace Drupal\options\Plugin\views\filter;
use Drupal\views\Attribute\ViewsFilter;
use Drupal\views\FieldAPIHandlerTrait;
use Drupal\views\Plugin\views\display\DisplayPluginBase;
use Drupal\views\Plugin\views\filter\ManyToOne;
......@@ -11,9 +12,8 @@
* Filter handler which uses list-fields as options.
*
* @ingroup views_filter_handlers
*
* @ViewsFilter("list_field")
*/
#[ViewsFilter("list_field")]
class ListField extends ManyToOne {
use FieldAPIHandlerTrait;
......
......@@ -4,6 +4,7 @@
use Drupal\Core\Form\FormStateInterface;
use Drupal\search\ViewsSearchQuery;
use Drupal\views\Attribute\ViewsFilter;
use Drupal\views\Plugin\views\filter\FilterPluginBase;
use Drupal\views\Plugin\views\display\DisplayPluginBase;
use Drupal\views\ViewExecutable;
......@@ -13,9 +14,8 @@
* Filter handler for search keywords.
*
* @ingroup views_filter_handlers
*
* @ViewsFilter("search_keywords")
*/
#[ViewsFilter("search_keywords")]
class Search extends FilterPluginBase {
/**
......
......@@ -8,6 +8,7 @@
use Drupal\taxonomy\Entity\Term;
use Drupal\taxonomy\TermStorageInterface;
use Drupal\taxonomy\VocabularyStorageInterface;
use Drupal\views\Attribute\ViewsFilter;
use Drupal\views\ViewExecutable;
use Drupal\views\Plugin\views\display\DisplayPluginBase;
use Drupal\views\Plugin\views\filter\ManyToOne;
......@@ -17,9 +18,8 @@
* Filter by term id.
*
* @ingroup views_filter_handlers
*
* @ViewsFilter("taxonomy_index_tid")
*/
#[ViewsFilter("taxonomy_index_tid")]
class TaxonomyIndexTid extends ManyToOne {
/**
......
......@@ -4,6 +4,7 @@
use Drupal\Core\Form\FormStateInterface;
use Drupal\taxonomy\TaxonomyIndexDepthQueryTrait;
use Drupal\views\Attribute\ViewsFilter;
/**
* Filter handler for taxonomy terms with depth.
......@@ -12,9 +13,8 @@
* because it uses a subquery to find nodes with.
*
* @ingroup views_filter_handlers
*
* @ViewsFilter("taxonomy_index_tid_depth")
*/
#[ViewsFilter("taxonomy_index_tid_depth")]
class TaxonomyIndexTidDepth extends TaxonomyIndexTid {
use TaxonomyIndexDepthQueryTrait;
......
......@@ -3,14 +3,14 @@
namespace Drupal\tracker\Plugin\views\filter;
use Drupal\user\Plugin\views\filter\Name;
use Drupal\views\Attribute\ViewsFilter;
/**
* UID filter to check for nodes that a user posted or commented on.
*
* @ingroup views_filter_handlers
*
* @ViewsFilter("tracker_user_uid")
*/
#[ViewsFilter("tracker_user_uid")]
class UserUid extends Name {
/**
......
......@@ -2,6 +2,7 @@
namespace Drupal\user\Plugin\views\filter;
use Drupal\views\Attribute\ViewsFilter;
use Drupal\views\Plugin\views\display\DisplayPluginBase;
use Drupal\views\ViewExecutable;
use Drupal\views\Plugin\views\filter\BooleanOperator;
......@@ -10,9 +11,8 @@
* Filter handler for the current user.
*
* @ingroup views_filter_handlers
*
* @ViewsFilter("user_current")
*/
#[ViewsFilter("user_current")]
class Current extends BooleanOperator {
/**
......
......@@ -5,15 +5,15 @@
use Drupal\Core\Entity\Element\EntityAutocomplete;
use Drupal\Core\Form\FormStateInterface;
use Drupal\user\Entity\User;
use Drupal\views\Attribute\ViewsFilter;
use Drupal\views\Plugin\views\filter\InOperator;
/**
* Filter handler for usernames.
*
* @ingroup views_filter_handlers
*
* @ViewsFilter("user_name")
*/
#[ViewsFilter("user_name")]
class Name extends InOperator {
protected $alwaysMultiple = TRUE;
......
......@@ -9,6 +9,7 @@
use Drupal\user\Entity\Role;
use Drupal\user\PermissionHandlerInterface;
use Drupal\user\RoleInterface;
use Drupal\views\Attribute\ViewsFilter;
use Drupal\views\Plugin\views\filter\ManyToOne;
use Symfony\Component\DependencyInjection\ContainerInterface;
......@@ -16,9 +17,8 @@
* Filter handler for user roles.
*
* @ingroup views_filter_handlers
*
* @ViewsFilter("user_permissions")
*/
#[ViewsFilter("user_permissions")]
class Permissions extends ManyToOne {
use DeprecatedServicePropertyTrait;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment