From 3930449815eea122faea040c42b79bdab01121e2 Mon Sep 17 00:00:00 2001 From: babruix Date: Sat, 9 Mar 2013 15:55:35 +0100 Subject: [PATCH] Issue #1912650 by thsutton: Documented pager views pager plugin. --- .../views/Plugin/views/pager/PagerPluginBase.php | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/pager/PagerPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/pager/PagerPluginBase.php index 1c877ff..358dcf8 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/pager/PagerPluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/pager/PagerPluginBase.php @@ -21,6 +21,31 @@ /** * The base plugin to handle pager. + * + * Pager plugins take care of everything regarding pagers, including getting + * setting the total number of items to render the pager and setting the global + * pager arrays. + * + * To define a pager type, extend this base class. The ViewsPluginManager (used to + * create views plugins objects) adds annotated discovery for pager plugins. Your + * pager plugin should have an annotation that includes the plugin's metadata, + * for example: + * @Plugin( + * id = "demo_pager", + * title = @Translation("Display a demonstration pager"), + * help = @Translation("Demonstrate pagination of views items."), + * theme = "views_demo_pager" + * ) + * The definition should include the following keys: + * - id: The unique identifier of your pager plugin. + * - title: The "full" title for your pager type; used in the views UI. + * - short_title: The "short" title for your pager type. + * The short_title is used in the views UI when specified. + * This is displayed in the views UI. + * - help: A short help string; this is displayed in the views UI. + * - theme: The theme function used to render the pager's output. + * + * @see \Drupal\views\Plugin\ViewsPluginManager */ abstract class PagerPluginBase extends PluginBase { -- 1.7.12.1