Issue #2216539 by jhodgdon, dawehner: Fill in @defgroup/topic docs for Views overview.
parent
539061c75b
commit
0843922e30
|
@ -440,23 +440,6 @@
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
|
||||||
* @defgroup views_overview Views overview
|
|
||||||
* @{
|
|
||||||
* Overview of the Views module API
|
|
||||||
*
|
|
||||||
* @todo write this
|
|
||||||
*
|
|
||||||
* Additional documentation paragraphs need to be written, and functions,
|
|
||||||
* classes, and interfaces need to be added to this topic. Should link to all
|
|
||||||
* or most of the existing Views topics, and maybe this should be moved into
|
|
||||||
* a different file? This topic should be an overview so that developers know
|
|
||||||
* which of the many Views classes and topics are important if they want to
|
|
||||||
* accomplish tasks that they may have.
|
|
||||||
* @}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup i18n Internationalization
|
* @defgroup i18n Internationalization
|
||||||
* @{
|
* @{
|
||||||
|
|
|
@ -9,12 +9,6 @@ use Drupal\views\Ajax\HighlightCommand;
|
||||||
use Drupal\Core\Ajax\OpenModalDialogCommand;
|
use Drupal\Core\Ajax\OpenModalDialogCommand;
|
||||||
use Drupal\Core\Ajax\AjaxResponse;
|
use Drupal\Core\Ajax\AjaxResponse;
|
||||||
|
|
||||||
/**
|
|
||||||
* @defgroup views_ajax Views AJAX library
|
|
||||||
* @{
|
|
||||||
* Handles the server side AJAX interactions of Views.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wrapper around drupal_build_form to handle some AJAX stuff automatically.
|
* Wrapper around drupal_build_form to handle some AJAX stuff automatically.
|
||||||
* This makes some assumptions about the client.
|
* This makes some assumptions about the client.
|
||||||
|
@ -67,7 +61,3 @@ function views_ajax_form_wrapper($form_id, &$form_state) {
|
||||||
|
|
||||||
return (!empty($form_state['title'])) ? array('#title' => $form_state['title'], '#markup' => $output) : $output;
|
return (!empty($form_state['title'])) ? array('#title' => $form_state['title'], '#markup' => $output) : $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @}
|
|
||||||
*/
|
|
||||||
|
|
|
@ -12,9 +12,11 @@ use Drupal\views\Annotation\ViewsPluginAnnotationBase;
|
||||||
/**
|
/**
|
||||||
* Defines a Plugin annotation object for views access plugins.
|
* Defines a Plugin annotation object for views access plugins.
|
||||||
*
|
*
|
||||||
* @Annotation
|
|
||||||
*
|
|
||||||
* @see \Drupal\views\Plugin\views\access\AccessPluginBase
|
* @see \Drupal\views\Plugin\views\access\AccessPluginBase
|
||||||
|
*
|
||||||
|
* @ingroup views_access_plugins
|
||||||
|
*
|
||||||
|
* @Annotation
|
||||||
*/
|
*/
|
||||||
class ViewsAccess extends ViewsPluginAnnotationBase {
|
class ViewsAccess extends ViewsPluginAnnotationBase {
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,11 @@ namespace Drupal\views\Annotation;
|
||||||
/**
|
/**
|
||||||
* Defines a Plugin annotation object for views area handlers.
|
* Defines a Plugin annotation object for views area handlers.
|
||||||
*
|
*
|
||||||
* @Annotation
|
|
||||||
*
|
|
||||||
* @see \Drupal\views\Plugin\views\area\AreaPluginBase
|
* @see \Drupal\views\Plugin\views\area\AreaPluginBase
|
||||||
|
*
|
||||||
|
* @ingroup views_area_handlers
|
||||||
|
*
|
||||||
|
* @Annotation
|
||||||
*/
|
*/
|
||||||
class ViewsArea extends ViewsHandlerAnnotationBase {
|
class ViewsArea extends ViewsHandlerAnnotationBase {
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,11 @@ namespace Drupal\views\Annotation;
|
||||||
/**
|
/**
|
||||||
* Defines a Plugin annotation object for views argument handlers.
|
* Defines a Plugin annotation object for views argument handlers.
|
||||||
*
|
*
|
||||||
* @Annotation
|
|
||||||
*
|
|
||||||
* @see \Drupal\views\Plugin\views\argument\ArgumentPluginBase
|
* @see \Drupal\views\Plugin\views\argument\ArgumentPluginBase
|
||||||
|
*
|
||||||
|
* @ingroup views_argument_handlers
|
||||||
|
*
|
||||||
|
* @Annotation
|
||||||
*/
|
*/
|
||||||
class ViewsArgument extends ViewsHandlerAnnotationBase {
|
class ViewsArgument extends ViewsHandlerAnnotationBase {
|
||||||
|
|
||||||
|
|
|
@ -12,9 +12,11 @@ use Drupal\views\Annotation\ViewsPluginAnnotationBase;
|
||||||
/**
|
/**
|
||||||
* Defines a Plugin annotation object for views argument default plugins.
|
* Defines a Plugin annotation object for views argument default plugins.
|
||||||
*
|
*
|
||||||
* @Annotation
|
|
||||||
*
|
|
||||||
* @see \Drupal\views\Plugin\views\argument_default\ArgumentDefaultPluginBase
|
* @see \Drupal\views\Plugin\views\argument_default\ArgumentDefaultPluginBase
|
||||||
|
*
|
||||||
|
* @ingroup views_argument_default_plugins
|
||||||
|
*
|
||||||
|
* @Annotation
|
||||||
*/
|
*/
|
||||||
class ViewsArgumentDefault extends ViewsPluginAnnotationBase {
|
class ViewsArgumentDefault extends ViewsPluginAnnotationBase {
|
||||||
|
|
||||||
|
|
|
@ -12,9 +12,11 @@ use Drupal\views\Annotation\ViewsPluginAnnotationBase;
|
||||||
/**
|
/**
|
||||||
* Defines a Plugin annotation object for views argument default plugins.
|
* Defines a Plugin annotation object for views argument default plugins.
|
||||||
*
|
*
|
||||||
* @Annotation
|
|
||||||
*
|
|
||||||
* @see \Drupal\views\Plugin\views\argument_validator\ArgumentValidatorPluginBase
|
* @see \Drupal\views\Plugin\views\argument_validator\ArgumentValidatorPluginBase
|
||||||
|
*
|
||||||
|
* @ingroup views_argument_validate_plugins
|
||||||
|
*
|
||||||
|
* @Annotation
|
||||||
*/
|
*/
|
||||||
class ViewsArgumentValidator extends ViewsPluginAnnotationBase {
|
class ViewsArgumentValidator extends ViewsPluginAnnotationBase {
|
||||||
|
|
||||||
|
|
|
@ -12,9 +12,11 @@ use Drupal\views\Annotation\ViewsPluginAnnotationBase;
|
||||||
/**
|
/**
|
||||||
* Defines a Plugin annotation object for views cache plugins.
|
* Defines a Plugin annotation object for views cache plugins.
|
||||||
*
|
*
|
||||||
* @Annotation
|
|
||||||
*
|
|
||||||
* @see \Drupal\views\Plugin\views\cache\CachePluginBase
|
* @see \Drupal\views\Plugin\views\cache\CachePluginBase
|
||||||
|
*
|
||||||
|
* @ingroup views_cache_plugins
|
||||||
|
*
|
||||||
|
* @Annotation
|
||||||
*/
|
*/
|
||||||
class ViewsCache extends ViewsPluginAnnotationBase {
|
class ViewsCache extends ViewsPluginAnnotationBase {
|
||||||
|
|
||||||
|
|
|
@ -12,9 +12,11 @@ use Drupal\views\Annotation\ViewsPluginAnnotationBase;
|
||||||
/**
|
/**
|
||||||
* Defines a Plugin annotation object for views display plugins.
|
* Defines a Plugin annotation object for views display plugins.
|
||||||
*
|
*
|
||||||
* @Annotation
|
|
||||||
*
|
|
||||||
* @see \Drupal\views\Plugin\views\display\DisplayPluginBase
|
* @see \Drupal\views\Plugin\views\display\DisplayPluginBase
|
||||||
|
*
|
||||||
|
* @ingroup views_display_plugins
|
||||||
|
*
|
||||||
|
* @Annotation
|
||||||
*/
|
*/
|
||||||
class ViewsDisplay extends ViewsPluginAnnotationBase {
|
class ViewsDisplay extends ViewsPluginAnnotationBase {
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,11 @@ namespace Drupal\views\Annotation;
|
||||||
/**
|
/**
|
||||||
* Defines a Plugin annotation object for views display extender plugins.
|
* Defines a Plugin annotation object for views display extender plugins.
|
||||||
*
|
*
|
||||||
* @Annotation
|
|
||||||
*
|
|
||||||
* @see \Drupal\views\Plugin\views\display_extender\DisplayExtenderPluginBase
|
* @see \Drupal\views\Plugin\views\display_extender\DisplayExtenderPluginBase
|
||||||
|
*
|
||||||
|
* @ingroup views_display_extender_plugins
|
||||||
|
*
|
||||||
|
* @Annotation
|
||||||
*/
|
*/
|
||||||
class ViewsDisplayExtender extends ViewsPluginAnnotationBase {
|
class ViewsDisplayExtender extends ViewsPluginAnnotationBase {
|
||||||
|
|
||||||
|
|
|
@ -12,9 +12,11 @@ use Drupal\views\Annotation\ViewsPluginAnnotationBase;
|
||||||
/**
|
/**
|
||||||
* Defines a Plugin annotation object for views exposed form plugins.
|
* Defines a Plugin annotation object for views exposed form plugins.
|
||||||
*
|
*
|
||||||
* @Annotation
|
|
||||||
*
|
|
||||||
* @see \Drupal\views\Plugin\views\exposed_form\ExposedFormPluginBase
|
* @see \Drupal\views\Plugin\views\exposed_form\ExposedFormPluginBase
|
||||||
|
*
|
||||||
|
* @ingroup views_exposed_form_plugins
|
||||||
|
*
|
||||||
|
* @Annotation
|
||||||
*/
|
*/
|
||||||
class ViewsExposedForm extends ViewsPluginAnnotationBase {
|
class ViewsExposedForm extends ViewsPluginAnnotationBase {
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,11 @@ namespace Drupal\views\Annotation;
|
||||||
/**
|
/**
|
||||||
* Defines a Plugin annotation object for views field handlers.
|
* Defines a Plugin annotation object for views field handlers.
|
||||||
*
|
*
|
||||||
* @Annotation
|
|
||||||
*
|
|
||||||
* @see \Drupal\views\Plugin\views\field\FieldPluginBase
|
* @see \Drupal\views\Plugin\views\field\FieldPluginBase
|
||||||
|
*
|
||||||
|
* @ingroup views_field_handlers
|
||||||
|
*
|
||||||
|
* @Annotation
|
||||||
*/
|
*/
|
||||||
class ViewsField extends ViewsHandlerAnnotationBase {
|
class ViewsField extends ViewsHandlerAnnotationBase {
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,11 @@ namespace Drupal\views\Annotation;
|
||||||
/**
|
/**
|
||||||
* Defines a Plugin annotation object for views filter handlers.
|
* Defines a Plugin annotation object for views filter handlers.
|
||||||
*
|
*
|
||||||
* @Annotation
|
|
||||||
*
|
|
||||||
* @see \Drupal\views\Plugin\views\filter\FilterPluginBase
|
* @see \Drupal\views\Plugin\views\filter\FilterPluginBase
|
||||||
|
*
|
||||||
|
* @ingroup views_filter_handlers
|
||||||
|
*
|
||||||
|
* @Annotation
|
||||||
*/
|
*/
|
||||||
class ViewsFilter extends ViewsHandlerAnnotationBase {
|
class ViewsFilter extends ViewsHandlerAnnotationBase {
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,11 @@ namespace Drupal\views\Annotation;
|
||||||
/**
|
/**
|
||||||
* Defines a Plugin annotation object for views join plugins.
|
* Defines a Plugin annotation object for views join plugins.
|
||||||
*
|
*
|
||||||
* @Annotation
|
|
||||||
*
|
|
||||||
* @see \Drupal\views\Plugin\views\join\JoinPluginBase
|
* @see \Drupal\views\Plugin\views\join\JoinPluginBase
|
||||||
|
*
|
||||||
|
* @ingroup views_join_handlers
|
||||||
|
*
|
||||||
|
* @Annotation
|
||||||
*/
|
*/
|
||||||
class ViewsJoin extends ViewsHandlerAnnotationBase {
|
class ViewsJoin extends ViewsHandlerAnnotationBase {
|
||||||
|
|
||||||
|
|
|
@ -12,9 +12,11 @@ use Drupal\views\Annotation\ViewsPluginAnnotationBase;
|
||||||
/**
|
/**
|
||||||
* Defines a Plugin annotation object for views pager plugins.
|
* Defines a Plugin annotation object for views pager plugins.
|
||||||
*
|
*
|
||||||
* @Annotation
|
|
||||||
*
|
|
||||||
* @see \Drupal\views\Plugin\views\pager\PagerPluginBase
|
* @see \Drupal\views\Plugin\views\pager\PagerPluginBase
|
||||||
|
*
|
||||||
|
* @ingroup views_pager_plugins
|
||||||
|
*
|
||||||
|
* @Annotation
|
||||||
*/
|
*/
|
||||||
class ViewsPager extends ViewsPluginAnnotationBase {
|
class ViewsPager extends ViewsPluginAnnotationBase {
|
||||||
|
|
||||||
|
|
|
@ -12,9 +12,11 @@ use Drupal\views\Annotation\ViewsPluginAnnotationBase;
|
||||||
/**
|
/**
|
||||||
* Defines a Plugin annotation object for views query plugins.
|
* Defines a Plugin annotation object for views query plugins.
|
||||||
*
|
*
|
||||||
* @Annotation
|
|
||||||
*
|
|
||||||
* @see \Drupal\views\Plugin\views\query\QueryPluginBase
|
* @see \Drupal\views\Plugin\views\query\QueryPluginBase
|
||||||
|
*
|
||||||
|
* @ingroup views_query_plugins
|
||||||
|
*
|
||||||
|
* @Annotation
|
||||||
*/
|
*/
|
||||||
class ViewsQuery extends ViewsPluginAnnotationBase {
|
class ViewsQuery extends ViewsPluginAnnotationBase {
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,11 @@ namespace Drupal\views\Annotation;
|
||||||
/**
|
/**
|
||||||
* Defines a Plugin annotation object for views relationship handlers.
|
* Defines a Plugin annotation object for views relationship handlers.
|
||||||
*
|
*
|
||||||
* @Annotation
|
|
||||||
*
|
|
||||||
* @see \Drupal\views\Plugin\views\relationship\RelationshipPluginBase
|
* @see \Drupal\views\Plugin\views\relationship\RelationshipPluginBase
|
||||||
|
*
|
||||||
|
* @ingroup views_relationship_handlers
|
||||||
|
*
|
||||||
|
* @Annotation
|
||||||
*/
|
*/
|
||||||
class ViewsRelationship extends ViewsHandlerAnnotationBase {
|
class ViewsRelationship extends ViewsHandlerAnnotationBase {
|
||||||
|
|
||||||
|
|
|
@ -12,9 +12,11 @@ use Drupal\views\Annotation\ViewsPluginAnnotationBase;
|
||||||
/**
|
/**
|
||||||
* Defines a Plugin annotation object for views row plugins.
|
* Defines a Plugin annotation object for views row plugins.
|
||||||
*
|
*
|
||||||
* @Annotation
|
|
||||||
*
|
|
||||||
* @see \Drupal\views\Plugin\views\row\RowPluginBase
|
* @see \Drupal\views\Plugin\views\row\RowPluginBase
|
||||||
|
*
|
||||||
|
* @ingroup views_row_plugins
|
||||||
|
*
|
||||||
|
* @Annotation
|
||||||
*/
|
*/
|
||||||
class ViewsRow extends ViewsPluginAnnotationBase {
|
class ViewsRow extends ViewsPluginAnnotationBase {
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,11 @@ namespace Drupal\views\Annotation;
|
||||||
/**
|
/**
|
||||||
* Defines a Plugin annotation object for views sort handlers.
|
* Defines a Plugin annotation object for views sort handlers.
|
||||||
*
|
*
|
||||||
* @Annotation
|
|
||||||
*
|
|
||||||
* @see \Drupal\views\Plugin\views\sort\SortPluginBase
|
* @see \Drupal\views\Plugin\views\sort\SortPluginBase
|
||||||
|
*
|
||||||
|
* @ingroup views_sort_handlers
|
||||||
|
*
|
||||||
|
* @Annotation
|
||||||
*/
|
*/
|
||||||
class ViewsSort extends ViewsHandlerAnnotationBase {
|
class ViewsSort extends ViewsHandlerAnnotationBase {
|
||||||
|
|
||||||
|
|
|
@ -12,9 +12,11 @@ use Drupal\views\Annotation\ViewsPluginAnnotationBase;
|
||||||
/**
|
/**
|
||||||
* Defines a Plugin annotation object for views style plugins.
|
* Defines a Plugin annotation object for views style plugins.
|
||||||
*
|
*
|
||||||
* @Annotation
|
|
||||||
*
|
|
||||||
* @see \Drupal\views\Plugin\views\style\StylePluginBase
|
* @see \Drupal\views\Plugin\views\style\StylePluginBase
|
||||||
|
*
|
||||||
|
* @ingroup views_style_plugins
|
||||||
|
*
|
||||||
|
* @Annotation
|
||||||
*/
|
*/
|
||||||
class ViewsStyle extends ViewsPluginAnnotationBase {
|
class ViewsStyle extends ViewsPluginAnnotationBase {
|
||||||
|
|
||||||
|
|
|
@ -12,9 +12,12 @@ use Drupal\views\Annotation\ViewsPluginAnnotationBase;
|
||||||
/**
|
/**
|
||||||
* Defines a Plugin annotation object for views wizard plugins.
|
* Defines a Plugin annotation object for views wizard plugins.
|
||||||
*
|
*
|
||||||
* @Annotation
|
|
||||||
*
|
|
||||||
* @see \Drupal\views\Plugin\views\wizard\WizardPluginBase
|
* @see \Drupal\views\Plugin\views\wizard\WizardPluginBase
|
||||||
|
* @see \Drupal\views\Plugin\views\wizard\WizardInterface
|
||||||
|
*
|
||||||
|
* @ingroup views_wizard_plugins
|
||||||
|
*
|
||||||
|
* @Annotation
|
||||||
*/
|
*/
|
||||||
class ViewsWizard extends ViewsPluginAnnotationBase {
|
class ViewsWizard extends ViewsPluginAnnotationBase {
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,8 @@ use Symfony\Component\DependencyInjection\Container;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Plugin type manager for all views plugins.
|
* Plugin type manager for all views plugins.
|
||||||
|
*
|
||||||
|
* @ingroup views_plugins
|
||||||
*/
|
*/
|
||||||
class ViewsPluginManager extends DefaultPluginManager {
|
class ViewsPluginManager extends DefaultPluginManager {
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,11 @@ use Drupal\Core\Database\Database;
|
||||||
use Drupal\views\Views;
|
use Drupal\views\Views;
|
||||||
use Drupal\views\ViewsData;
|
use Drupal\views\ViewsData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base class for Views handler plugins.
|
||||||
|
*
|
||||||
|
* @ingroup views_plugins
|
||||||
|
*/
|
||||||
abstract class HandlerBase extends PluginBase {
|
abstract class HandlerBase extends PluginBase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -37,6 +37,8 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||||
* root directory.
|
* root directory.
|
||||||
* - module: machine name of the module. It must be present for any plugin that
|
* - module: machine name of the module. It must be present for any plugin that
|
||||||
* wants to register a theme.
|
* wants to register a theme.
|
||||||
|
*
|
||||||
|
* @ingroup views_plugins
|
||||||
*/
|
*/
|
||||||
abstract class PluginBase extends ComponentPluginBase implements ContainerFactoryPluginInterface {
|
abstract class PluginBase extends ComponentPluginBase implements ContainerFactoryPluginInterface {
|
||||||
|
|
||||||
|
|
|
@ -14,10 +14,17 @@ use Symfony\Component\Routing\Route;
|
||||||
/**
|
/**
|
||||||
* @defgroup views_access_plugins Views access plugins
|
* @defgroup views_access_plugins Views access plugins
|
||||||
* @{
|
* @{
|
||||||
* The base plugin to handle access to a view.
|
* Plugins to handle access checking for views.
|
||||||
*
|
*
|
||||||
* Therefore it primarily has to implement the access and the alterRouteDefinition
|
* Access plugins are responsible for controlling access to the view.
|
||||||
* method.
|
*
|
||||||
|
* Access plugins extend \Drupal\views\Plugin\views\access\AccessPluginBase,
|
||||||
|
* implementing the access() and alterRouteDefinition() methods. They must be
|
||||||
|
* annotated with \Drupal\views\Annotation\ViewsAccess annotation, and they
|
||||||
|
* must be in namespace directory Plugin\views\access.
|
||||||
|
*
|
||||||
|
* @ingroup views_plugins
|
||||||
|
* @see plugin_api
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* Definition of Drupal\views\Plugin\views\area\AreaPluginBase.
|
* Contains \Drupal\views\Plugin\views\area\AreaPluginBase.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Drupal\views\Plugin\views\area;
|
namespace Drupal\views\Plugin\views\area;
|
||||||
|
@ -12,16 +12,20 @@ use Drupal\views\Plugin\views\display\DisplayPluginBase;
|
||||||
use Drupal\views\Plugin\views\HandlerBase;
|
use Drupal\views\Plugin\views\HandlerBase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup views_area_handlers Views area handlers
|
* @defgroup views_area_handlers Views area handler plugins
|
||||||
* @{
|
* @{
|
||||||
* Handlers to tell Views what can display in header, footer
|
* Plugins governing areas of views, such as header, footer, and empty text.
|
||||||
* and empty text in a view.
|
*
|
||||||
|
* Area handler plugins extend \Drupal\views\Plugin\views\area\AreaHandlerBase.
|
||||||
|
* They must be annotated with \Drupal\views\Annotation\ViewsArea annotation,
|
||||||
|
* and they must be in namespace directory Plugin\views\area.
|
||||||
|
*
|
||||||
|
* @ingroup views_plugins
|
||||||
|
* @see plugin_api
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base class for area handlers.
|
* Base class for area handler plugins.
|
||||||
*
|
|
||||||
* @ingroup views_area_handlers
|
|
||||||
*/
|
*/
|
||||||
abstract class AreaPluginBase extends HandlerBase {
|
abstract class AreaPluginBase extends HandlerBase {
|
||||||
|
|
||||||
|
|
|
@ -17,12 +17,23 @@ use Drupal\views\Views;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup views_argument_handlers Views argument handlers
|
* @defgroup views_argument_handlers Views argument handlers
|
||||||
* Handlers to tell Views how to contextually filter queries.
|
|
||||||
* @{
|
* @{
|
||||||
|
* Handler plugins for Views contextual filters.
|
||||||
|
*
|
||||||
|
* Handler plugins help build the view query object. Views argument handlers
|
||||||
|
* are for contextual filtering.
|
||||||
|
*
|
||||||
|
* Views argument handlers extend
|
||||||
|
* \Drupal\views\Plugin\views\argument\ArgumentHandlerBase. They must be
|
||||||
|
* annotated with \Drupal\views\Annotation\ViewsArgument annotation, and they
|
||||||
|
* must be in namespace directory Plugin\views\argument.
|
||||||
|
*
|
||||||
|
* @ingroup views_plugins
|
||||||
|
* @see plugin_api
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base class for arguments.
|
* Base class for argument (contextual filter) handler plugins.
|
||||||
*
|
*
|
||||||
* The basic argument works for very simple arguments such as nid and uid
|
* The basic argument works for very simple arguments such as nid and uid
|
||||||
*
|
*
|
||||||
|
@ -42,8 +53,6 @@ use Drupal\views\Views;
|
||||||
* and may disappear or change.
|
* and may disappear or change.
|
||||||
* - numeric: If set to TRUE this field is numeric and will use %d instead of
|
* - numeric: If set to TRUE this field is numeric and will use %d instead of
|
||||||
* %s in queries.
|
* %s in queries.
|
||||||
*
|
|
||||||
* @ingroup views_argument_handlers
|
|
||||||
*/
|
*/
|
||||||
abstract class ArgumentPluginBase extends HandlerBase {
|
abstract class ArgumentPluginBase extends HandlerBase {
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* Definition of Drupal\views\Plugin\views\argument_default\ArgumentDefaultPluginBase.
|
* Contains \Drupal\views\Plugin\views\argument_default\ArgumentDefaultPluginBase.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Drupal\views\Plugin\views\argument_default;
|
namespace Drupal\views\Plugin\views\argument_default;
|
||||||
|
@ -14,7 +14,20 @@ use Drupal\views\Plugin\views\PluginBase;
|
||||||
/**
|
/**
|
||||||
* @defgroup views_argument_default_plugins Views argument default plugins
|
* @defgroup views_argument_default_plugins Views argument default plugins
|
||||||
* @{
|
* @{
|
||||||
* Allow specialized methods of filling in arguments when they aren't provided.
|
* Plugins for argument defaults in Views.
|
||||||
|
*
|
||||||
|
* Argument default plugins provide default values for contextual filters.
|
||||||
|
* This is useful for blocks and other display types lacking a natural argument
|
||||||
|
* input. Examples are plugins to extract node and user IDs from the URL.
|
||||||
|
*
|
||||||
|
* Argument default plugins extend
|
||||||
|
* \Drupal\views\Plugin\views\argument_default\ArgumentDefaultPluginBase. They
|
||||||
|
* must be annotated with \Drupal\Views\Annotation\ViewsArgumentDefault
|
||||||
|
* annotation, and they must be in namespace directory
|
||||||
|
* Plugin\views\argument_default.
|
||||||
|
*
|
||||||
|
* @ingroup views_plugins
|
||||||
|
* @see plugin_api
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* Definition of Drupal\views\Plugin\views\argument_validator\ArgumentValidatorPluginBase.
|
* Contains \Drupal\views\Plugin\views\argument_validator\ArgumentValidatorPluginBase.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Drupal\views\Plugin\views\argument_validator;
|
namespace Drupal\views\Plugin\views\argument_validator;
|
||||||
|
@ -14,7 +14,23 @@ use Drupal\views\Plugin\views\PluginBase;
|
||||||
/**
|
/**
|
||||||
* @defgroup views_argument_validate_plugins Views argument validate plugins
|
* @defgroup views_argument_validate_plugins Views argument validate plugins
|
||||||
* @{
|
* @{
|
||||||
* Allow specialized methods of validating arguments.
|
* Plugins for validating views contextual filters.
|
||||||
|
*
|
||||||
|
* Views argument validator plugins validate contextual filters (arguments) on
|
||||||
|
* views. They can ensure arguments are valid, and even do transformations on
|
||||||
|
* the arguments. They can also provide replacement patterns for the view title.
|
||||||
|
* For example, the 'content' validator verifies verifies that the argument
|
||||||
|
* value corresponds to a node, loads that node, and provides the node title
|
||||||
|
* as a replacement pattern for the view title.
|
||||||
|
*
|
||||||
|
* Argument validator plugins extend
|
||||||
|
* \Drupal\views\Plugin\views\argument_validator\ArgumentValidatorPluginBase.
|
||||||
|
* They must be annotated with
|
||||||
|
* \Drupal\views\Plugin\Annotation\ViewsArgumentValidator annotation, and they
|
||||||
|
* must be in namespace directory Plugin\views\argument_validator.
|
||||||
|
*
|
||||||
|
* @ingroup views_plugins
|
||||||
|
* @see plugin_api
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* Definition of Drupal\views\Plugin\views\cache\CachePluginBase.
|
* Contains \Drupal\views\Plugin\views\cache\CachePluginBase.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Drupal\views\Plugin\views\cache;
|
namespace Drupal\views\Plugin\views\cache;
|
||||||
|
@ -14,10 +14,17 @@ use Drupal\Core\Database\Query\Select;
|
||||||
/**
|
/**
|
||||||
* @defgroup views_cache_plugins Views cache plugins
|
* @defgroup views_cache_plugins Views cache plugins
|
||||||
* @{
|
* @{
|
||||||
* The base plugin to handler caching of a view.
|
* Plugins to handle the storage and loading of Views caches.
|
||||||
*
|
*
|
||||||
* Cache plugins can handle both caching of just the database result and
|
* Cache plugins control the storage and loading of caches in Views, for
|
||||||
* the rendered output of the view.
|
* both result and render caching.
|
||||||
|
*
|
||||||
|
* Cache plugins extend \Drupal\views\Plugin\views\cache\CachePluginBase.
|
||||||
|
* They must be annotated with \Drupal\views\Annotation\ViewsCache
|
||||||
|
* annotation, and must be in namespace directory Plugin\views\cache.
|
||||||
|
*
|
||||||
|
* @ingroup views_plugins
|
||||||
|
* @see plugin_api
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* Contains Drupal\views\Plugin\views\display\DisplayPluginBase.
|
* Contains \Drupal\views\Plugin\views\display\DisplayPluginBase.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Drupal\views\Plugin\views\display;
|
namespace Drupal\views\Plugin\views\display;
|
||||||
|
@ -22,16 +22,26 @@ use Symfony\Component\DependencyInjection\Exception\RuntimeException as Dependen
|
||||||
/**
|
/**
|
||||||
* @defgroup views_display_plugins Views display plugins
|
* @defgroup views_display_plugins Views display plugins
|
||||||
* @{
|
* @{
|
||||||
* Display plugins control how Views interact with the rest of Drupal.
|
* Plugins to handle the overall display of views.
|
||||||
*
|
*
|
||||||
* They can handle creating Views from a Drupal page hook; they can
|
* Display plugins are responsible for controlling where a view is rendered;
|
||||||
* handle creating Views from a Drupal block hook. They can also
|
* that is, how it is exposed to other parts of Drupal. 'Page' and 'block' are
|
||||||
* handle creating Views from an external module source.
|
* the most commonly used display plugins. Each view also has a 'master' (or
|
||||||
|
* 'default') display that includes information shared between all its
|
||||||
|
* displays (see \Drupal\views\Plugin\views\display\DefaultDisplay).
|
||||||
|
*
|
||||||
|
* Display plugins extend \Drupal\views\Plugin\views\display\DisplayPluginBase.
|
||||||
|
* They must be annotated with \Drupal\views\Plugin\Annotation\ViewsDisplay
|
||||||
|
* annotation, and they must be in namespace directory Plugin\views\display.
|
||||||
|
*
|
||||||
|
* @ingroup views_plugins
|
||||||
|
*
|
||||||
|
* @see plugin_api
|
||||||
|
* @see views_display_extender_plugins
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default display plugin handler. Display plugins handle options and
|
* Base class for views display plugins.
|
||||||
* basic mechanisms for different output methods.
|
|
||||||
*/
|
*/
|
||||||
abstract class DisplayPluginBase extends PluginBase {
|
abstract class DisplayPluginBase extends PluginBase {
|
||||||
|
|
||||||
|
|
|
@ -2,13 +2,15 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* Definition of Drupal\views\Plugin\views\display_extender\DefaultDisplayExtender.
|
* Contains \Drupal\views\Plugin\views\display_extender\DefaultDisplayExtender.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Drupal\views\Plugin\views\display_extender;
|
namespace Drupal\views\Plugin\views\display_extender;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @todo
|
* Default display extender plugin; does nothing.
|
||||||
|
*
|
||||||
|
* @ingroup views_display_extender_plugins
|
||||||
*
|
*
|
||||||
* @ViewsDisplayExtender(
|
* @ViewsDisplayExtender(
|
||||||
* id = "default",
|
* id = "default",
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* Definition of Drupal\views\Plugin\views\display_extender\DisplayExtenderPluginBase.
|
* Contains \Drupal\views\Plugin\views\display_extender\DisplayExtenderPluginBase.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Drupal\views\Plugin\views\display_extender;
|
namespace Drupal\views\Plugin\views\display_extender;
|
||||||
|
@ -11,9 +11,30 @@ use Drupal\views\ViewExecutable;
|
||||||
use Drupal\views\Plugin\views\PluginBase;
|
use Drupal\views\Plugin\views\PluginBase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @todo.
|
* @defgroup views_display_extender_plugins Views display extender plugins
|
||||||
|
* @{
|
||||||
|
* Plugins that offer additional display options across display types.
|
||||||
*
|
*
|
||||||
* @ingroup views_display_plugins
|
* Display extender plugins allow additional options or configuration to be
|
||||||
|
* added to views across all display types. For example, if you wanted to allow
|
||||||
|
* site users to add certain metadata to the rendered output of every view
|
||||||
|
* display regardless of display type, you could provide this option as a
|
||||||
|
* display extender.
|
||||||
|
*
|
||||||
|
* Display extender plugins extend
|
||||||
|
* \Drupal\views\Plugin\views\display_extender\DisplayExtenderPluginBase.
|
||||||
|
* They must be annotated with
|
||||||
|
* \Drupal\views\Plugin\Annotation\ViewsDisplayExtender annotation, and they
|
||||||
|
* must be in namespace directory Plugin\views\display_extender.
|
||||||
|
*
|
||||||
|
* @ingroup views_plugins
|
||||||
|
*
|
||||||
|
* @see plugin_api
|
||||||
|
* @see views_display_plugins
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base class for Views display extender plugins.
|
||||||
*/
|
*/
|
||||||
abstract class DisplayExtenderPluginBase extends PluginBase {
|
abstract class DisplayExtenderPluginBase extends PluginBase {
|
||||||
|
|
||||||
|
@ -61,3 +82,7 @@ abstract class DisplayExtenderPluginBase extends PluginBase {
|
||||||
public function defaultableSections(&$sections, $section = NULL) { }
|
public function defaultableSections(&$sections, $section = NULL) { }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* Definition of Drupal\views\Plugin\views\exposed_form\ExposedFormPluginBase.
|
* Contains \Drupal\views\Plugin\views\exposed_form\ExposedFormPluginBase.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Drupal\views\Plugin\views\exposed_form;
|
namespace Drupal\views\Plugin\views\exposed_form;
|
||||||
|
@ -16,13 +16,21 @@ use Drupal\views\Plugin\views\PluginBase;
|
||||||
/**
|
/**
|
||||||
* @defgroup views_exposed_form_plugins Views exposed form plugins
|
* @defgroup views_exposed_form_plugins Views exposed form plugins
|
||||||
* @{
|
* @{
|
||||||
* Plugins that handle the validation/submission and rendering of exposed forms.
|
* Plugins that handle validation, submission, and rendering of exposed forms.
|
||||||
*
|
*
|
||||||
* If needed, it is possible to use them to add additional form elements.
|
* Exposed forms are used for filters, sorts, and pager settings that are
|
||||||
|
* exposed to site visitors. Exposed form plugins handle the rendering,
|
||||||
|
* validation, and submission of exposed forms, and may add additional form
|
||||||
|
* elements.
|
||||||
|
*
|
||||||
|
* Exposed form plugins extend
|
||||||
|
* \Drupal\views\Plugin\views\exposed_form\ExposedFormPluginBase. They must be
|
||||||
|
* annotated with \Drupal\views\Plugin\Annotation\ViewsExposedForm annotation,
|
||||||
|
* and they must be in namespace directory Plugin\views\exposed_form.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The base plugin to handle exposed filter forms.
|
* Base class for Views exposed filter form plugins.
|
||||||
*/
|
*/
|
||||||
abstract class ExposedFormPluginBase extends PluginBase {
|
abstract class ExposedFormPluginBase extends PluginBase {
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* Definition of Drupal\views\Plugin\views\field\FieldPluginBase.
|
* Contains \Drupal\views\Plugin\views\field\FieldPluginBase.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Drupal\views\Plugin\views\field;
|
namespace Drupal\views\Plugin\views\field;
|
||||||
|
@ -17,24 +17,33 @@ use Drupal\views\ResultRow;
|
||||||
use Drupal\views\ViewExecutable;
|
use Drupal\views\ViewExecutable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup views_field_handlers Views field handlers
|
* @defgroup views_field_handlers Views field handler plugins
|
||||||
* @{
|
* @{
|
||||||
* Handlers to tell Views how to build and display fields.
|
* Handler plugins for Views fields.
|
||||||
*
|
*
|
||||||
|
* Field handlers handle both querying and display of fields in views.
|
||||||
|
*
|
||||||
|
* Field handler plugins extend
|
||||||
|
* \Drupal\views\Plugin\views\field\FieldHandlerBase. They must be
|
||||||
|
* annotated with \Drupal\views\Annotation\ViewsField annotation, and they
|
||||||
|
* must be in namespace directory Plugin\views\field.
|
||||||
|
*
|
||||||
|
* The following items can go into a hook_views_data() implementation in a
|
||||||
|
* field section to affect how the field handler will behave:
|
||||||
|
* - additional fields: An array of fields that should be added to the query.
|
||||||
|
* The array is in the form of:
|
||||||
|
* @code
|
||||||
|
* array('identifier' => array('table' => tablename, 'field' => fieldname))
|
||||||
|
* @endcode
|
||||||
|
* As many fields as are necessary may be in this array.
|
||||||
|
* - click sortable: If TRUE (default), this field may be click sorted.
|
||||||
|
*
|
||||||
|
* @ingroup views_plugins
|
||||||
|
* @see plugin_api
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base field handler that has no options and renders an unformatted field.
|
* Base field handler that has no options and renders an unformatted field.
|
||||||
*
|
|
||||||
* Definition terms:
|
|
||||||
* - additional fields: An array of fields that should be added to the query
|
|
||||||
* for some purpose. The array is in the form of:
|
|
||||||
* array('identifier' => array('table' => tablename,
|
|
||||||
* 'field' => fieldname); as many fields as are necessary
|
|
||||||
* may be in this array.
|
|
||||||
* - click sortable: If TRUE, this field may be click sorted.
|
|
||||||
*
|
|
||||||
* @ingroup views_field_handlers
|
|
||||||
*/
|
*/
|
||||||
abstract class FieldPluginBase extends HandlerBase {
|
abstract class FieldPluginBase extends HandlerBase {
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* Definition of Drupal\views\Plugin\views\filter\FilterPluginBase.
|
* Contains \Drupal\views\Plugin\views\filter\FilterPluginBase.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Drupal\views\Plugin\views\filter;
|
namespace Drupal\views\Plugin\views\filter;
|
||||||
|
@ -14,30 +14,33 @@ use Drupal\views\Plugin\views\display\DisplayPluginBase;
|
||||||
use Drupal\views\ViewExecutable;
|
use Drupal\views\ViewExecutable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup views_filter_handlers Views filter handlers
|
* @defgroup views_filter_handlers Views filter handler plugins
|
||||||
* @{
|
* @{
|
||||||
* Handlers to tell Views how to filter queries.
|
* Plugins that handle views filtering.
|
||||||
*
|
*
|
||||||
* Definition items:
|
* Filter handler plugins extend
|
||||||
|
* \Drupal\views\Plugin\views\filter\FilterHandlerBase. They must be annotated
|
||||||
|
* with \Drupal\views\Annotation\ViewsFilter annotation, and they must be in
|
||||||
|
* namespace directory Plugin\views\filter.
|
||||||
|
*
|
||||||
|
* The following items can go into a hook_views_data() implementation in a
|
||||||
|
* filter section to affect how the filter handler will behave:
|
||||||
* - allow empty: If true, the 'IS NULL' and 'IS NOT NULL' operators become
|
* - allow empty: If true, the 'IS NULL' and 'IS NOT NULL' operators become
|
||||||
* available as standard operators.
|
* available as standard operators.
|
||||||
*
|
*
|
||||||
* Object flags:
|
* You can refine the behavior of filters by setting the following Boolean
|
||||||
* You can set some specific behavior by setting up the following flags on
|
* member variables to TRUE in your plugin class:
|
||||||
* your custom class.
|
* - $alwaysMultiple: Disable the possibility of forcing a single value.
|
||||||
|
* - $no_operator: Disable the possibility of using operators.
|
||||||
|
* - $always_required: Disable the possibility of allowing an exposed input to
|
||||||
|
* be optional.
|
||||||
*
|
*
|
||||||
* - alwaysMultiple:
|
* @ingroup views_plugins
|
||||||
* Disable the possibility to force a single value.
|
* @see plugin_api
|
||||||
* - no_operator:
|
|
||||||
* Disable the possibility to use operators.
|
|
||||||
* - always_required:
|
|
||||||
* Disable the possibility to allow a exposed input to be optional.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base class for filters.
|
* Base class for Views filters handler plugins.
|
||||||
*
|
|
||||||
* @ingroup views_filter_handlers
|
|
||||||
*/
|
*/
|
||||||
abstract class FilterPluginBase extends HandlerBase {
|
abstract class FilterPluginBase extends HandlerBase {
|
||||||
|
|
||||||
|
|
|
@ -10,15 +10,22 @@ namespace Drupal\views\Plugin\views\join;
|
||||||
use Drupal\Core\Plugin\PluginBase;
|
use Drupal\Core\Plugin\PluginBase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup views_join_handlers Views join handlers
|
* @defgroup views_join_handlers Views join handler plugins
|
||||||
* @{
|
* @{
|
||||||
* Handlers to tell Views how to join tables together.
|
* Handler plugins for Views table joins.
|
||||||
*
|
*
|
||||||
* Here is an example how to join from table one to example two so it produces
|
* Handler plugins help build the view query object. Join handler plugins
|
||||||
* the following sql:
|
* handle table joins.
|
||||||
|
*
|
||||||
|
* Views join handlers extend \Drupal\views\Plugin\views\join\JoinPluginBase.
|
||||||
|
* They must be annotated with \Drupal\views\Annotation\ViewsJoin annotation,
|
||||||
|
* and they must be in namespace directory Plugin\views\join.
|
||||||
|
*
|
||||||
|
* Here is an example of how to join from table one to table two so it produces
|
||||||
|
* the following SQL:
|
||||||
* @code
|
* @code
|
||||||
* INNER JOIN {two} ON one.field_a = two.field_b
|
* INNER JOIN {two} ON one.field_a = two.field_b
|
||||||
* @code.
|
* @endcode
|
||||||
* The required php code for this kind of functionality is the following:
|
* The required php code for this kind of functionality is the following:
|
||||||
* @code
|
* @code
|
||||||
* $configuration = array(
|
* $configuration = array(
|
||||||
|
@ -29,9 +36,9 @@ use Drupal\Core\Plugin\PluginBase;
|
||||||
* 'operator' => '='
|
* 'operator' => '='
|
||||||
* );
|
* );
|
||||||
* $join = Views::pluginManager('join')->createInstance('standard', $configuration);
|
* $join = Views::pluginManager('join')->createInstance('standard', $configuration);
|
||||||
|
* @endcode
|
||||||
*
|
*
|
||||||
* To do complex joins:
|
* Here is an example of a more complex join:
|
||||||
*
|
|
||||||
* @code
|
* @code
|
||||||
* class JoinComplex extends JoinPluginBase {
|
* class JoinComplex extends JoinPluginBase {
|
||||||
* public function buildJoin($select_query, $table, $view_query) {
|
* public function buildJoin($select_query, $table, $view_query) {
|
||||||
|
@ -41,6 +48,9 @@ use Drupal\Core\Plugin\PluginBase;
|
||||||
* }
|
* }
|
||||||
* }
|
* }
|
||||||
* @endcode
|
* @endcode
|
||||||
|
*
|
||||||
|
* @ingroup views_plugins
|
||||||
|
* @see plugin_api
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -10,6 +10,8 @@ namespace Drupal\views\Plugin\views\join;
|
||||||
/**
|
/**
|
||||||
* Default implementation of the join plugin.
|
* Default implementation of the join plugin.
|
||||||
*
|
*
|
||||||
|
* @ingroup views_join_handlers
|
||||||
|
*
|
||||||
* @ViewsJoin("standard")
|
* @ViewsJoin("standard")
|
||||||
*/
|
*/
|
||||||
class Standard extends JoinPluginBase {
|
class Standard extends JoinPluginBase {
|
||||||
|
|
|
@ -9,13 +9,17 @@ namespace Drupal\views\Plugin\views\join;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Join handler for relationships that join with a subquery as the left field.
|
* Join handler for relationships that join with a subquery as the left field.
|
||||||
* E.g:
|
|
||||||
* LEFT JOIN node node_term_data ON ([YOUR SUBQUERY HERE]) = node_term_data.nid
|
|
||||||
*
|
*
|
||||||
* Join definition:
|
* For example:
|
||||||
* same as \Drupal\views\Plugin\views\join\JoinPluginBase, except:
|
* @code
|
||||||
* - left_query: The subquery to use in the left side of the join clause.
|
* LEFT JOIN node node_term_data ON ([YOUR SUBQUERY HERE]) = node_term_data.nid
|
||||||
|
* @endcode
|
||||||
*
|
*
|
||||||
|
* Join definition: same as \Drupal\views\Plugin\views\join\JoinPluginBase,
|
||||||
|
* except:
|
||||||
|
* - left_query: The subquery to use in the left side of the join clause.
|
||||||
|
*
|
||||||
|
* @ingroup views_join_handlers
|
||||||
* @ViewsJoin("subquery")
|
* @ViewsJoin("subquery")
|
||||||
*/
|
*/
|
||||||
class Subquery extends JoinPluginBase {
|
class Subquery extends JoinPluginBase {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* Definition of Drupal\views\Plugin\views\pager\PagerPluginBase.
|
* Contains \Drupal\views\Plugin\views\pager\PagerPluginBase.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Drupal\views\Plugin\views\pager;
|
namespace Drupal\views\Plugin\views\pager;
|
||||||
|
@ -13,43 +13,22 @@ use Drupal\views\ViewExecutable;
|
||||||
/**
|
/**
|
||||||
* @defgroup views_pager_plugins Views pager plugins
|
* @defgroup views_pager_plugins Views pager plugins
|
||||||
* @{
|
* @{
|
||||||
* The base plugin to handler pagers of a view.
|
* Plugins to handle paging in views.
|
||||||
*
|
*
|
||||||
* The pager takes care about altering the query for its needs, altering some
|
* Pager plugins take care of everything regarding pagers, including figuring
|
||||||
* global information of pagers and finally rendering itself.
|
* out the total number of items to render, setting up the query for paging,
|
||||||
|
* and setting up the pager.
|
||||||
|
*
|
||||||
|
* Pager plugins extend \Drupal\views\Plugin\views\pager\PagerPluginBase. They
|
||||||
|
* must be annotated with \Drupal\views\Plugin\Annotation\ViewsPager annotation,
|
||||||
|
* and they must be in namespace directory Plugin\views\pager.
|
||||||
|
*
|
||||||
|
* @ingroup views_plugins
|
||||||
|
* @see plugin_api
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The base plugin to handle pager.
|
* Base class for views pager plugins.
|
||||||
*
|
|
||||||
* Pager plugins take care of everything regarding pagers, including getting
|
|
||||||
* and 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 must have an annotation that includes the plugin's metadata,
|
|
||||||
* for example:
|
|
||||||
* @code
|
|
||||||
* @ Plugin(
|
|
||||||
* id = "demo_pager",
|
|
||||||
* title = @ Translation("Display a demonstration pager"),
|
|
||||||
* help = @ Translation("Demonstrate pagination of views items."),
|
|
||||||
* theme = "views_demo_pager"
|
|
||||||
* )
|
|
||||||
* @endcode
|
|
||||||
* Remove spaces after @ in your actual plugin - these are put into this sample
|
|
||||||
* code so that it is not recognized as annotation.
|
|
||||||
*
|
|
||||||
* The plugin annotation contains these components:
|
|
||||||
* - id: The unique identifier of your pager plugin.
|
|
||||||
* - title: The "full" title for your pager type; used in the views UI.
|
|
||||||
* - short_title: (optional) The "short" title for your pager type;
|
|
||||||
* used in the views UI when specified.
|
|
||||||
* - help: (optional) 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 {
|
abstract class PagerPluginBase extends PluginBase {
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,26 @@ use Drupal\views\ViewExecutable;
|
||||||
use Drupal\views\Views;
|
use Drupal\views\Views;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @todo.
|
* @defgroup views_query_plugins Views query plugins
|
||||||
|
* @{
|
||||||
|
* Plugins for views queries.
|
||||||
|
*
|
||||||
|
* Query plugins generate and execute a built query object against a
|
||||||
|
* particular storage backend, converting the Views query object into an
|
||||||
|
* actual query. Although query plugins need not necessarily use SQL, most
|
||||||
|
* other handler plugins that affect the query (fields, filters, etc.)
|
||||||
|
* implicitly assume that the query is using SQL.
|
||||||
|
*
|
||||||
|
* Query plugins extend \Drupal\views\Plugin\views\query\QueryPluginBase.
|
||||||
|
* They must be annotated with \Drupal\views\Plugin\Annotation\ViewsQuery
|
||||||
|
* annotation, and they must be in namespace directory Plugin\views\query.
|
||||||
|
*
|
||||||
|
* @ingroup views_plugins
|
||||||
|
* @see plugin_api
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base plugin class for Views queries.
|
||||||
*/
|
*/
|
||||||
abstract class QueryPluginBase extends PluginBase {
|
abstract class QueryPluginBase extends PluginBase {
|
||||||
|
|
||||||
|
@ -267,3 +286,7 @@ abstract class QueryPluginBase extends PluginBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* Definition of Drupal\views\Plugin\views\query\Sql.
|
* Contains \Drupal\views\Plugin\views\query\Sql.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Drupal\views\Plugin\views\query;
|
namespace Drupal\views\Plugin\views\query;
|
||||||
|
@ -17,7 +17,9 @@ use Drupal\views\ViewExecutable;
|
||||||
use Drupal\views\Views;
|
use Drupal\views\Views;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @todo.
|
* Views query plugin for an SQL query.
|
||||||
|
*
|
||||||
|
* @ingroup views_query_plugins
|
||||||
*
|
*
|
||||||
* @ViewsQuery(
|
* @ViewsQuery(
|
||||||
* id = "views_query",
|
* id = "views_query",
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* Definition of Drupal\views\Plugin\views\relationship\RelationshipPluginBase.
|
* Contains \Drupal\views\Plugin\views\relationship\RelationshipPluginBase.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Drupal\views\Plugin\views\relationship;
|
namespace Drupal\views\Plugin\views\relationship;
|
||||||
|
@ -16,7 +16,15 @@ use Drupal\views\Views;
|
||||||
/**
|
/**
|
||||||
* @defgroup views_relationship_handlers Views relationship handlers
|
* @defgroup views_relationship_handlers Views relationship handlers
|
||||||
* @{
|
* @{
|
||||||
* Handlers to tell Views how to create alternate relationships.
|
* Plugins for handling views relationships.
|
||||||
|
*
|
||||||
|
* Relationship handlers extend
|
||||||
|
* \Drupal\views\Plugin\views\relationship\RelationshipHandlerBase. They must
|
||||||
|
* be annotated with \Drupal\views\Annotation\ViewsRelationship annotation,
|
||||||
|
* and they must be in namespace directory Plugin\views\relationship.
|
||||||
|
*
|
||||||
|
* @ingroup views_plugins
|
||||||
|
* @see plugin_api
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* Definition of Drupal\views\Plugin\views\row\RowPluginBase.
|
* Contains \Drupal\views\Plugin\views\row\RowPluginBase.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Drupal\views\Plugin\views\row;
|
namespace Drupal\views\Plugin\views\row;
|
||||||
|
@ -14,15 +14,31 @@ use Drupal\views\Views;
|
||||||
/**
|
/**
|
||||||
* @defgroup views_row_plugins Views row plugins
|
* @defgroup views_row_plugins Views row plugins
|
||||||
* @{
|
* @{
|
||||||
* Row plugins control how Views outputs an individual record.
|
* Plugins that control how Views outputs an individual record.
|
||||||
*
|
*
|
||||||
* They are tightly coupled to style plugins, in that a style plugin is what
|
* Row plugins handle rendering each individual record from the view results.
|
||||||
* calls the row plugin.
|
* For instance, a row plugin could render fields, render an entire entity
|
||||||
|
* in a particular view mode, or render the raw data from the results.
|
||||||
|
*
|
||||||
|
* Row plugins are used by some (but not all) style plugins. They are not
|
||||||
|
* activated unless the style plugin sets them up. See the
|
||||||
|
* @link views_style_plugins Views style plugins topic @endlink for
|
||||||
|
* more information.
|
||||||
|
*
|
||||||
|
* Row plugins extend \Drupal\views\Plugin\views\row\RowPluginBase. They must
|
||||||
|
* be annotated with \Drupal\views\Plugin\Annotation\ViewsRow annotation, and
|
||||||
|
* they must be in namespace directory Plugin\views\row.
|
||||||
|
*
|
||||||
|
* @ingroup views_plugins
|
||||||
|
* @see plugin_api
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default plugin to view a single row of a table. This is really just a wrapper around
|
* Base class for Views row plugins.
|
||||||
* a theme function.
|
*
|
||||||
|
* This is really just a wrapper around a theme hook. It renders a row
|
||||||
|
* of the result table by putting it into a render array with the set theme
|
||||||
|
* hook.
|
||||||
*/
|
*/
|
||||||
abstract class RowPluginBase extends PluginBase {
|
abstract class RowPluginBase extends PluginBase {
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* Definition of Drupal\views\Plugin\views\sort\SortPluginBase.
|
* Contains \Drupal\views\Plugin\views\sort\SortPluginBase.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Drupal\views\Plugin\views\sort;
|
namespace Drupal\views\Plugin\views\sort;
|
||||||
|
@ -10,15 +10,20 @@ namespace Drupal\views\Plugin\views\sort;
|
||||||
use Drupal\views\Plugin\views\HandlerBase;
|
use Drupal\views\Plugin\views\HandlerBase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup views_sort_handlers Views sort handlers
|
* @defgroup views_sort_handlers Views sort handler plugins
|
||||||
* @{
|
* @{
|
||||||
* Handlers to tell Views how to sort queries.
|
* Plugins that handle sorting for Views.
|
||||||
|
*
|
||||||
|
* Sort handlers extend \Drupal\views\Plugin\views\sort:SortHandlerBase. They
|
||||||
|
* must be annotated with \Drupal\views\Annotation\ViewsSort annotation, and
|
||||||
|
* they must be in plugin directory Plugin\views\sort.
|
||||||
|
*
|
||||||
|
* @ingroup views_plugins
|
||||||
|
* @see plugin_api
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base sort handler that has no options and performs a simple sort.
|
* Base sort handler that has no options and performs a simple sort.
|
||||||
*
|
|
||||||
* @ingroup views_sort_handlers
|
|
||||||
*/
|
*/
|
||||||
abstract class SortPluginBase extends HandlerBase {
|
abstract class SortPluginBase extends HandlerBase {
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* Definition of Drupal\views\Plugin\views\style\StylePluginBase.
|
* Contains \Drupal\views\Plugin\views\style\StylePluginBase.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Drupal\views\Plugin\views\style;
|
namespace Drupal\views\Plugin\views\style;
|
||||||
|
@ -15,17 +15,28 @@ use Drupal\views\ViewExecutable;
|
||||||
/**
|
/**
|
||||||
* @defgroup views_style_plugins Views style plugins
|
* @defgroup views_style_plugins Views style plugins
|
||||||
* @{
|
* @{
|
||||||
* Style plugins control how a view is rendered. For example, they
|
* Plugins that control how the collection of results is rendered in a view.
|
||||||
* can choose to display a collection of fields, node_view() output,
|
|
||||||
* table output, or any kind of crazy output they want.
|
|
||||||
*
|
*
|
||||||
* Many style plugins can have an optional 'row' plugin, that displays
|
* Style plugins control a view is displayed. For the most part, they are
|
||||||
* a single record. Not all style plugins can utilize this, so it is
|
* object wrappers around theme templates. Examples of styles include HTML
|
||||||
* up to the plugin to set this up and call through to the row plugin.
|
* lists, tables, full or teaser content views, etc.
|
||||||
|
*
|
||||||
|
* Many (but not all) style plugins have an optional row plugin, which
|
||||||
|
* displays a single record. Not all style plugins use row plugins, so it is
|
||||||
|
* up to the style plugin to set this up and call the row plugin. See the
|
||||||
|
* @link views_row_plugins Views row plugins topic @endlink for more
|
||||||
|
* information.
|
||||||
|
*
|
||||||
|
* Style plugins extend \Drupal\views\Plugin\views\style\StylePluginBase. They
|
||||||
|
* must be annotated with \Drupal\views\Plugin\Annotation\ViewsStyle
|
||||||
|
* annotation, and they must be in namespace directory Plugin\views\style.
|
||||||
|
*
|
||||||
|
* @ingroup views_plugins
|
||||||
|
* @see plugin_api
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base class to define a style plugin handler.
|
* Base class for views style plugins.
|
||||||
*/
|
*/
|
||||||
abstract class StylePluginBase extends PluginBase {
|
abstract class StylePluginBase extends PluginBase {
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,10 @@
|
||||||
namespace Drupal\views\Plugin\views\wizard;
|
namespace Drupal\views\Plugin\views\wizard;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Standard Views wizard plugin.
|
||||||
|
*
|
||||||
|
* @ingroup views_wizard_plugins
|
||||||
|
*
|
||||||
* @ViewsWizard(
|
* @ViewsWizard(
|
||||||
* id = "standard",
|
* id = "standard",
|
||||||
* derivative = "Drupal\views\Plugin\Derivative\DefaultWizardDeriver",
|
* derivative = "Drupal\views\Plugin\Derivative\DefaultWizardDeriver",
|
||||||
|
|
|
@ -2,13 +2,15 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* Definition of Drupal\views\Plugin\views\wizard\WizardInterface.
|
* Contains \Drupal\views\Plugin\views\wizard\WizardInterface.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Drupal\views\Plugin\views\wizard;
|
namespace Drupal\views\Plugin\views\wizard;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines a common interface for Views Wizard plugins.
|
* Defines a common interface for Views Wizard plugins.
|
||||||
|
*
|
||||||
|
* @ingroup views_wizard_plugins
|
||||||
*/
|
*/
|
||||||
interface WizardInterface {
|
interface WizardInterface {
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* Definition of Drupal\views\Plugin\views\wizard\WizardPluginBase.
|
* Contains \Drupal\views\Plugin\views\wizard\WizardPluginBase.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Drupal\views\Plugin\views\wizard;
|
namespace Drupal\views\Plugin\views\wizard;
|
||||||
|
@ -16,7 +16,21 @@ use Drupal\views\Plugin\views\PluginBase;
|
||||||
use Drupal\views\Plugin\views\wizard\WizardInterface;
|
use Drupal\views\Plugin\views\wizard\WizardInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides the interface and base class for Views Wizard plugins.
|
* @defgroup views_wizard_plugins Views wizard plugins
|
||||||
|
* @{
|
||||||
|
* Plugins for Views wizards.
|
||||||
|
*
|
||||||
|
* Wizard handlers implement \Drupal\views\Plugin\views\wizard\WizardInterface,
|
||||||
|
* and usually extend \Drupal\views\Plugin\views\wizard\WizardPluginBase. They
|
||||||
|
* must be annotated with \Drupal\views\Annotation\ViewsWizard annotation,
|
||||||
|
* and they must be in namespace directory Plugin\views\wizard.
|
||||||
|
*
|
||||||
|
* @ingroup views_plugins
|
||||||
|
* @see plugin_api
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base class for Views wizard plugins.
|
||||||
*
|
*
|
||||||
* This is a very generic Views Wizard class that can be constructed for any
|
* This is a very generic Views Wizard class that can be constructed for any
|
||||||
* base table.
|
* base table.
|
||||||
|
@ -1191,3 +1205,7 @@ abstract class WizardPluginBase extends PluginBase implements WizardInterface {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
|
@ -16,13 +16,8 @@ use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup views_objects Objects that represent a View or part of a view
|
* Represents a view as a whole.
|
||||||
* @{
|
*
|
||||||
* These objects are the core of Views do the bulk of the direction and
|
|
||||||
* storing of data. All database activity is in these objects.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An object to contain all of the data to generate a view, plus the member
|
* An object to contain all of the data to generate a view, plus the member
|
||||||
* functions to build the view query, execute the query and render the output.
|
* functions to build the view query, execute the query and render the output.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -7,85 +7,45 @@
|
||||||
|
|
||||||
use Drupal\Core\Language\LanguageInterface;
|
use Drupal\Core\Language\LanguageInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @defgroup views_overview Views overview
|
||||||
|
* @{
|
||||||
|
* Overview of the Views module API
|
||||||
|
*
|
||||||
|
* The Views module is a generalized query and display engine, which can be used
|
||||||
|
* to make views (formatted lists, grids, feeds, and other output) of items
|
||||||
|
* (often entities, but can be other types of data). Developers can interact
|
||||||
|
* with Views in several ways:
|
||||||
|
* - Provide plugins: Views plugins govern nearly every aspect of views,
|
||||||
|
* including querying (sorting, filtering, etc.) and display (at several
|
||||||
|
* levels of granularity, ranging from the entire view to the details of a
|
||||||
|
* field). See the @link views_plugins Views plugins topic @endlink for
|
||||||
|
* more information.
|
||||||
|
* - Provide data: Data types can be provided to Views by implementing
|
||||||
|
* hook_views_data(), and data types provided by other modules can be
|
||||||
|
* altered by implementing hook_views_data_alter().
|
||||||
|
* - Implement hooks: A few operations in Views can be influenced by hooks.
|
||||||
|
* See the @link Views hooks topic @endlink for a list.
|
||||||
|
* - Theming: See the @link views_templates Views templates topic @endlink
|
||||||
|
* for more information.
|
||||||
|
*
|
||||||
|
* @see \Drupal\views\ViewExecutable
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup views_plugins Views plugins
|
* @defgroup views_plugins Views plugins
|
||||||
*
|
*
|
||||||
* Views plugins are objects that are used to build and render the view.
|
* Views plugins are objects that are used to build and render the view.
|
||||||
* Plugins are registered by extending one of the Views base plugin classes
|
* See individual views plugin topics for more information about the
|
||||||
* and defining settings in the plugin annotation. For more information about
|
* specifics of each plugin type, and the
|
||||||
* plugins, see the @link plugin_api Plugin API topic. @endlink
|
* @link plugin_api Plugin API topic @endlink for more information about
|
||||||
|
* plugins in general.
|
||||||
*
|
*
|
||||||
* Views has the following types of plugins:
|
* Some Views plugins are known as handlers. Handler plugins help build the
|
||||||
* - Access: Access plugins are responsible for controlling access to the
|
* view query object: filtering, contextual filtering, sorting, relationships,
|
||||||
* view. Views includes plugins for checking user roles and individual
|
* etc.
|
||||||
* permissions. Access plugins extend
|
|
||||||
* \Drupal\views\Plugin\views\access\AccessPluginBase.
|
|
||||||
* - Argument default: Argument default plugins allow pluggable ways of
|
|
||||||
* providing default values for contextual filters. This is useful for
|
|
||||||
* blocks and other display types lacking a natural argument input.
|
|
||||||
* Examples are plugins to extract node and user IDs from the URL. Argument
|
|
||||||
* default plugins extend
|
|
||||||
* \Drupal\views\Plugin\views\argument_default\ArgumentDefaultPluginBase.
|
|
||||||
* - Argument validator: Validator plugins can ensure arguments are valid,
|
|
||||||
* and even do transformations on the arguments. They can also provide
|
|
||||||
* replacement patterns for the view title. For example, the 'content'
|
|
||||||
* validator verifies verifies that the argument value corresponds to a
|
|
||||||
* node, loads that node and provides the node title as a replacement
|
|
||||||
* pattern. Argument validator plugins extend
|
|
||||||
* \Drupal\views\Plugin\views\argument_validator\ArgumentValidatorPluginBase.
|
|
||||||
* - Cache: Cache plugins control the storage and loading of caches.
|
|
||||||
* Currently they can do both result and render caching. It might also be
|
|
||||||
* possible to cache the generated query. Cache plugins extend
|
|
||||||
* \Drupal\views\Plugin\views\cache\CachePluginBase.
|
|
||||||
* - Display: Display plugins are responsible for controlling where a View is
|
|
||||||
* rendered; that is, how it is exposed to other parts of Drupal. 'Page'
|
|
||||||
* and 'block' are the most commonly used display plugins. Each View also
|
|
||||||
* has a 'master' (or 'default') display that includes information shared
|
|
||||||
* between all its displays. (See
|
|
||||||
* \Drupal\views\Plugin\views\display\DefaultDisplay.) Display plugins extend
|
|
||||||
* \Drupal\views\Plugin\views\display\DisplayPluginBase.
|
|
||||||
* - Display extender: Display extender plugins allow additional options or
|
|
||||||
* configurations to added to views across all display types. For example,
|
|
||||||
* if you wanted to allow site users to add certain metadata to the rendered
|
|
||||||
* output of every view display regardless of display type, you could provide
|
|
||||||
* this option as a display extender. Display extender plugins extend
|
|
||||||
* \Drupal\views\Plugin\views\display_extender\DisplayExtenderPluginBase.
|
|
||||||
* - Exposed form: Exposed form plugins are responsible for building,
|
|
||||||
* rendering, and controlling exposed forms. Exposed form plugins extend
|
|
||||||
* \Drupal\views\Plugin\views\display\DisplayPluginBase.
|
|
||||||
* - Handlers: Handler plugins help build the view query object that the query
|
|
||||||
* plugin then executes to retrieve the data from the storage backend (see
|
|
||||||
* below). There are several types of handlers:
|
|
||||||
* - Area handlers: Extend \Drupal\views\Plugin\views\area\AreaHandlerBase
|
|
||||||
* - Argument handlers: Extend
|
|
||||||
* \Drupal\views\Plugin\views\argument\ArgumentHandlerBase
|
|
||||||
* - Field handlers: Extend \Drupal\views\Plugin\views\field\FieldHandlerBase
|
|
||||||
* - Filter handlers: Extend
|
|
||||||
* \Drupal\views\Plugin\views\filter\FilterHandlerBase
|
|
||||||
* - Relationship handlers:
|
|
||||||
* Extend \Drupal\views\Plugin\views\relationship\RelationshipHandlerBase
|
|
||||||
* - Sort handlers: Extend \Drupal\views\Plugin\views\sort:SortHandlerBase
|
|
||||||
* - 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. Pager plugins extend
|
|
||||||
* \Drupal\views\Plugin\views\pager\PagerPluginBase.
|
|
||||||
* - Query: Query plugins generate and execute a built query object against a
|
|
||||||
* particular storage backend, converting the Views query object into an
|
|
||||||
* actual query. The only default implementation is SQL. (Note that most
|
|
||||||
* handler plugins currently rely on the SQL query plugin.) Query plugins
|
|
||||||
* extend \Drupal\views\Plugin\views\query\QueryPluginBase.
|
|
||||||
* - Row style: Row styles handle rendering each individual record from the
|
|
||||||
* main view table. The two default implementations render the entire entity
|
|
||||||
* (nodes only), or selected fields. Row style plugins extend
|
|
||||||
* \Drupal\views\Plugin\views\row\RowPluginBase).
|
|
||||||
* - Style: Style plugins control how a view is displayed. For the most part
|
|
||||||
* they are object wrappers around theme templates. Examples of styles
|
|
||||||
* include HTML lists, tables, etc. Style plugins extend
|
|
||||||
* \Drupal\views\Plugin\views\style\StylePluginBase.
|
|
||||||
*
|
*
|
||||||
* @todo Add an explanation for each type of handler.
|
|
||||||
* @todo Add @ingroup to all the base plugins for this group.
|
|
||||||
* @todo Add a separate @ingroup for all plugins?
|
|
||||||
* @todo Document specific options on the appropriate plugin base classes.
|
* @todo Document specific options on the appropriate plugin base classes.
|
||||||
* @todo Add examples.
|
* @todo Add examples.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue