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

Issue #3426959: Convert ViewsArea plugin discovery to attributes

parent 99fc4306
Branches
Tags
31 merge requests!12227Issue #3181946 by jonmcl, mglaman,!11131[10.4.x-only-DO-NOT-MERGE]: Issue ##2842525 Ajax attached to Views exposed filter form does not trigger callbacks,!9470[10.3.x-only-DO-NOT-MERGE]: #3331771 Fix file_get_contents(): Passing null to parameter,!8540Issue #3457061: Bootstrap Modal dialog Not closing after 10.3.0 Update,!8528Issue #3456871 by Tim Bozeman: Support NULL services,!8373Issue #3427374 by danflanagan8, Vighneshh: taxonomy_tid ViewsArgumentDefault...,!7526Expose roles in response,!7352Draft: Resolve #3203489 "Set filename as",!5423Draft: Resolve #3329907 "Test2",!3878Removed unused condition head title for views,!3818Issue #2140179: $entity->original gets stale between updates,!3742Issue #3328429: Create item list field formatter for displaying ordered and unordered lists,!3731Claro: role=button on status report items,!3651Issue #3347736: Create new SDC component for Olivero (header-search),!3531Issue #3336994: StringFormatter always displays links to entity even if the user in context does not have access,!3478Issue #3337882: Deleted menus are not removed from content type config,!3355Issue #3209129: Scrolling problems when adding a block via layout builder,!3154Fixes #2987987 - CSRF token validation broken on routes with optional parameters.,!3133core/modules/system/css/components/hidden.module.css,!2964Issue #2865710 : Dependencies from only one instance of a widget are used in display modes,!2812Issue #3312049: [Followup] Fix Drupal.Commenting.FunctionComment.MissingReturnType returns for NULL,!2794Issue #3100732: Allow specifying `meta` data on JSON:API objects,!2378Issue #2875033: Optimize joins and table selection in SQL entity query implementation,!2062Issue #3246454: Add weekly granularity to views date sort,!1105Issue #3025039: New non translatable field on translatable content throws error,!1073issue #3191727: Focus states on mobile second level navigation items fixed,!10223132456: Fix issue where views instances are emptied before an ajax request is complete,!877Issue #2708101: Default value for link text is not saved,!579Issue #2230909: Simple decimals fail to pass validation,!560Move callback classRemove outside of the loop,!555Issue #3202493
Pipeline #124918 passed with warnings
Pipeline: drupal

#124921

    Showing
    with 45 additions and 27 deletions
    ...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
    use Drupal\Core\Access\AccessManagerInterface; use Drupal\Core\Access\AccessManagerInterface;
    use Drupal\Core\Session\AccountInterface; use Drupal\Core\Session\AccountInterface;
    use Drupal\Core\Url; use Drupal\Core\Url;
    use Drupal\views\Attribute\ViewsArea;
    use Drupal\views\Plugin\views\area\AreaPluginBase; use Drupal\views\Plugin\views\area\AreaPluginBase;
    use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\ContainerInterface;
    ...@@ -12,9 +13,8 @@ ...@@ -12,9 +13,8 @@
    * Defines an area plugin to display a block add link. * Defines an area plugin to display a block add link.
    * *
    * @ingroup views_area_handlers * @ingroup views_area_handlers
    *
    * @ViewsArea("block_content_listing_empty")
    */ */
    #[ViewsArea("block_content_listing_empty")]
    class ListingEmpty extends AreaPluginBase { class ListingEmpty extends AreaPluginBase {
    /** /**
    ......
    ...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
    use Drupal\Core\Access\AccessManagerInterface; use Drupal\Core\Access\AccessManagerInterface;
    use Drupal\Core\Url; use Drupal\Core\Url;
    use Drupal\views\Attribute\ViewsArea;
    use Drupal\views\Plugin\views\area\AreaPluginBase; use Drupal\views\Plugin\views\area\AreaPluginBase;
    use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\ContainerInterface;
    ...@@ -11,9 +12,8 @@ ...@@ -11,9 +12,8 @@
    * Defines an area plugin to display a node/add link. * Defines an area plugin to display a node/add link.
    * *
    * @ingroup views_area_handlers * @ingroup views_area_handlers
    *
    * @ViewsArea("node_listing_empty")
    */ */
    #[ViewsArea("node_listing_empty")]
    class ListingEmpty extends AreaPluginBase { class ListingEmpty extends AreaPluginBase {
    /** /**
    ......
    <?php
    namespace Drupal\views\Attribute;
    use Drupal\Component\Plugin\Attribute\PluginID;
    /**
    * Defines a Plugin attribute object for views area handlers.
    *
    * @see \Drupal\views\Plugin\views\area\AreaPluginBase
    *
    * @ingroup views_area_handlers
    */
    #[\Attribute(\Attribute::TARGET_CLASS)]
    class ViewsArea extends PluginID {
    }
    ...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
    * Plugins governing areas of views, such as header, footer, and empty text. * Plugins governing areas of views, such as header, footer, and empty text.
    * *
    * Area handler plugins extend \Drupal\views\Plugin\views\area\AreaPluginBase. * Area handler plugins extend \Drupal\views\Plugin\views\area\AreaPluginBase.
    * They must be annotated with \Drupal\views\Annotation\ViewsArea annotation, * They must be attributed with \Drupal\views\Attribute\ViewsArea attribute,
    * and they must be in namespace directory Plugin\views\area. * and they must be in namespace directory Plugin\views\area.
    * *
    * @ingroup views_plugins * @ingroup views_plugins
    ......
    ...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
    namespace Drupal\views\Plugin\views\area; namespace Drupal\views\Plugin\views\area;
    use Drupal\views\Attribute\ViewsArea;
    use Drupal\views\Plugin\views\BrokenHandlerTrait; use Drupal\views\Plugin\views\BrokenHandlerTrait;
    /** /**
    * A special handler to take the place of missing or broken handlers. * A special handler to take the place of missing or broken handlers.
    * *
    * @ingroup views_area_handlers * @ingroup views_area_handlers
    *
    * @ViewsArea("broken")
    */ */
    #[ViewsArea("broken")]
    class Broken extends AreaPluginBase { class Broken extends AreaPluginBase {
    use BrokenHandlerTrait; use BrokenHandlerTrait;
    ......
    ...@@ -6,15 +6,15 @@ ...@@ -6,15 +6,15 @@
    use Drupal\Core\EventSubscriber\MainContentViewSubscriber; use Drupal\Core\EventSubscriber\MainContentViewSubscriber;
    use Drupal\Core\Form\FormBuilderInterface; use Drupal\Core\Form\FormBuilderInterface;
    use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Form\FormStateInterface;
    use Drupal\views\Attribute\ViewsArea;
    use Drupal\views\Plugin\views\display\PathPluginBase; use Drupal\views\Plugin\views\display\PathPluginBase;
    /** /**
    * Views area display_link handler. * Views area display_link handler.
    * *
    * @ingroup views_area_handlers * @ingroup views_area_handlers
    *
    * @ViewsArea("display_link")
    */ */
    #[ViewsArea("display_link")]
    class DisplayLink extends AreaPluginBase { class DisplayLink extends AreaPluginBase {
    /** /**
    ......
    ...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
    use Drupal\Core\Entity\EntityRepositoryInterface; use Drupal\Core\Entity\EntityRepositoryInterface;
    use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Entity\EntityTypeManagerInterface;
    use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Form\FormStateInterface;
    use Drupal\views\Attribute\ViewsArea;
    use Drupal\views\Plugin\views\display\DisplayPluginBase; use Drupal\views\Plugin\views\display\DisplayPluginBase;
    use Drupal\views\ViewExecutable; use Drupal\views\ViewExecutable;
    use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\ContainerInterface;
    ...@@ -14,9 +15,8 @@ ...@@ -14,9 +15,8 @@
    * Provides an area handler which renders an entity in a certain view mode. * Provides an area handler which renders an entity in a certain view mode.
    * *
    * @ingroup views_area_handlers * @ingroup views_area_handlers
    *
    * @ViewsArea("entity")
    */ */
    #[ViewsArea("entity")]
    class Entity extends TokenizeAreaPluginBase { class Entity extends TokenizeAreaPluginBase {
    /** /**
    ......
    ...@@ -3,15 +3,15 @@ ...@@ -3,15 +3,15 @@
    namespace Drupal\views\Plugin\views\area; namespace Drupal\views\Plugin\views\area;
    use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Form\FormStateInterface;
    use Drupal\views\Attribute\ViewsArea;
    use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
    /** /**
    * Alter the HTTP response status code used by the view. * Alter the HTTP response status code used by the view.
    * *
    * @ingroup views_area_handlers * @ingroup views_area_handlers
    *
    * @ViewsArea("http_status_code")
    */ */
    #[ViewsArea("http_status_code")]
    class HTTPStatusCode extends AreaPluginBase { class HTTPStatusCode extends AreaPluginBase {
    /** /**
    ......
    ...@@ -2,13 +2,14 @@ ...@@ -2,13 +2,14 @@
    namespace Drupal\views\Plugin\views\area; namespace Drupal\views\Plugin\views\area;
    use Drupal\views\Attribute\ViewsArea;
    /** /**
    * Provides an area for messages. * Provides an area for messages.
    * *
    * @ingroup views_area_handlers * @ingroup views_area_handlers
    *
    * @ViewsArea("messages")
    */ */
    #[ViewsArea("messages")]
    class Messages extends AreaPluginBase { class Messages extends AreaPluginBase {
    /** /**
    ......
    ...@@ -4,15 +4,15 @@ ...@@ -4,15 +4,15 @@
    use Drupal\Component\Utility\Html; use Drupal\Component\Utility\Html;
    use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Form\FormStateInterface;
    use Drupal\views\Attribute\ViewsArea;
    use Drupal\views\Plugin\views\style\DefaultSummary; use Drupal\views\Plugin\views\style\DefaultSummary;
    /** /**
    * Views area handler to display some configurable result summary. * Views area handler to display some configurable result summary.
    * *
    * @ingroup views_area_handlers * @ingroup views_area_handlers
    *
    * @ViewsArea("result")
    */ */
    #[ViewsArea("result")]
    class Result extends AreaPluginBase { class Result extends AreaPluginBase {
    /** /**
    ......
    ...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
    namespace Drupal\views\Plugin\views\area; namespace Drupal\views\Plugin\views\area;
    use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Form\FormStateInterface;
    use Drupal\views\Attribute\ViewsArea;
    /** /**
    * Views area text handler. * Views area text handler.
    * *
    * @ingroup views_area_handlers * @ingroup views_area_handlers
    *
    * @ViewsArea("text")
    */ */
    #[ViewsArea("text")]
    class Text extends TokenizeAreaPluginBase { class Text extends TokenizeAreaPluginBase {
    /** /**
    ......
    ...@@ -4,14 +4,14 @@ ...@@ -4,14 +4,14 @@
    use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Form\FormStateInterface;
    use Drupal\Component\Utility\Xss; use Drupal\Component\Utility\Xss;
    use Drupal\views\Attribute\ViewsArea;
    /** /**
    * Views area text handler. * Views area text handler.
    * *
    * @ingroup views_area_handlers * @ingroup views_area_handlers
    *
    * @ViewsArea("text_custom")
    */ */
    #[ViewsArea("text_custom")]
    class TextCustom extends TokenizeAreaPluginBase { class TextCustom extends TokenizeAreaPluginBase {
    /** /**
    ......
    ...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
    namespace Drupal\views\Plugin\views\area; namespace Drupal\views\Plugin\views\area;
    use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Form\FormStateInterface;
    use Drupal\views\Attribute\ViewsArea;
    /** /**
    * Views area title override handler. * Views area title override handler.
    * *
    * @ingroup views_area_handlers * @ingroup views_area_handlers
    *
    * @ViewsArea("title")
    */ */
    #[ViewsArea("title")]
    class Title extends AreaPluginBase { class Title extends AreaPluginBase {
    /** /**
    ......
    ...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
    use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Entity\EntityStorageInterface;
    use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Form\FormStateInterface;
    use Drupal\views\Attribute\ViewsArea;
    use Drupal\views\Views; use Drupal\views\Views;
    use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\ContainerInterface;
    ...@@ -11,9 +12,8 @@ ...@@ -11,9 +12,8 @@
    * Views area handlers. Insert a view inside of an area. * Views area handlers. Insert a view inside of an area.
    * *
    * @ingroup views_area_handlers * @ingroup views_area_handlers
    *
    * @ViewsArea("view")
    */ */
    #[ViewsArea("view")]
    class View extends AreaPluginBase { class View extends AreaPluginBase {
    /** /**
    ......
    ...@@ -4,15 +4,15 @@ ...@@ -4,15 +4,15 @@
    use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Form\FormStateInterface;
    use Drupal\Core\Session\AccountInterface; use Drupal\Core\Session\AccountInterface;
    use Drupal\views\Attribute\ViewsArea;
    use Drupal\views\Plugin\views\area\AreaPluginBase; use Drupal\views\Plugin\views\area\AreaPluginBase;
    /** /**
    * Test area plugin. * Test area plugin.
    * *
    * @see \Drupal\views\Tests\Handler\AreaTest * @see \Drupal\views\Tests\Handler\AreaTest
    *
    * @ViewsArea("test_example")
    */ */
    #[ViewsArea("test_example")]
    class TestExample extends AreaPluginBase { class TestExample extends AreaPluginBase {
    /** /**
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment