Drupal 8  8.0.2
PathPluginBase Class Reference
Inheritance diagram for PathPluginBase:

Public Member Functions

 __construct (array $configuration, $plugin_id, $plugin_definition, RouteProviderInterface $route_provider, StateInterface $state)
 
 hasPath ()
 
 getPath ()
 
 collectRoutes (RouteCollection $collection)
 
 alterRoutes (RouteCollection $collection)
 
 getMenuLinks ()
 
 execute ()
 
 optionsSummary (&$categories, &$options)
 
 buildOptionsForm (&$form, FormStateInterface $form_state)
 
 validateOptionsForm (&$form, FormStateInterface $form_state)
 
 submitOptionsForm (&$form, FormStateInterface $form_state)
 
 validate ()
 
 getUrlInfo ()
 
 getRouteName ()
 
 getAlteredRouteNames ()
 
- Public Member Functions inherited from DisplayPluginBase
 __construct (array $configuration, $plugin_id, $plugin_definition)
 
 destroy ()
 
 isDefaultDisplay ()
 
 usesExposed ()
 
 displaysExposed ()
 
 usesAJAX ()
 
 ajaxEnabled ()
 
 isEnabled ()
 
 usesPager ()
 
 isPagerEnabled ()
 
 usesMore ()
 
 isMoreEnabled ()
 
 useGroupBy ()
 
 useMoreAlways ()
 
 useMoreText ()
 
 acceptAttachments ()
 
 usesAttachments ()
 
 usesAreas ()
 
 attachTo (ViewExecutable $view, $display_id, array &$build)
 
 defaultableSections ($section=NULL)
 
 hasPath ()
 
 usesLinkDisplay ()
 
 usesExposedFormInBlock ()
 
 getAttachedDisplays ()
 
 getLinkDisplay ()
 
 getPath ()
 
 getRoutedDisplay ()
 
 getUrl ()
 
 isDefaulted ($option)
 
 getOption ($option)
 
 usesFields ()
 
 getPlugin ($type)
 
getHandler ($type, $id)
 
getHandlers ($type)
 
 calculateDependencies ()
 
 getFieldLabels ($groupable_only=FALSE)
 
 setOption ($option, $value)
 
 overrideOption ($option, $value)
 
 optionLink ($text, $section, $class= '', $title= '')
 
 getArgumentsTokens ()
 
 optionsSummary (&$categories, &$options)
 
 buildOptionsForm (&$form, FormStateInterface $form_state)
 
 validateOptionsForm (&$form, FormStateInterface $form_state)
 
 optionsOverride ($form, FormStateInterface $form_state)
 
 setOverride ($section, $new_state=NULL)
 
 query ()
 
 renderFilters ()
 
 renderPager ()
 
 renderMoreLink ()
 
 render ()
 
 elementPreRender (array $element)
 
 renderArea ($area, $empty=FALSE)
 
 preExecute ()
 
 getCacheMetadata ()
 
 execute ()
 
 buildRenderable (array $args=[], $cache=TRUE)
 
 preview ()
 
 getType ()
 
 validate ()
 
 newDisplay ()
 
 isIdentifierUnique ($id, $identifier)
 
 outputIsEmpty ()
 
 getSpecialBlocks ()
 
 viewExposedFormBlocks ()
 
 getArgumentText ()
 
 getPagerText ()
 
 mergeDefaults ()
 
 remove ()
 
 getExtenders ()
 
- Public Member Functions inherited from PluginBase
 __construct (array $configuration, $plugin_id, $plugin_definition)
 
 init (ViewExecutable $view, DisplayPluginBase $display, array &$options=NULL)
 
 filterByDefinedOptions (array &$storage)
 
 unpackOptions (&$storage, $options, $definition=NULL, $all=TRUE, $check=TRUE)
 
 destroy ()
 
 buildOptionsForm (&$form, FormStateInterface $form_state)
 
 validateOptionsForm (&$form, FormStateInterface $form_state)
 
 submitOptionsForm (&$form, FormStateInterface $form_state)
 
 query ()
 
 themeFunctions ()
 
 validate ()
 
 summaryTitle ()
 
 pluginTitle ()
 
 usesOptions ()
 
 globalTokenReplace ($string= '', array $options=array())
 
 getAvailableGlobalTokens ($prepared=FALSE, array $types=array())
 
 globalTokenForm (&$form, FormStateInterface $form_state)
 
 calculateDependencies ()
 
 getProvider ()
 
- Public Member Functions inherited from PluginInspectionInterface
 getPluginId ()
 
 getPluginDefinition ()
 
- Public Member Functions inherited from DerivativeInspectionInterface
 getBaseId ()
 
 getDerivativeId ()
 
- Public Member Functions inherited from DisplayPluginInterface
 initDisplay (ViewExecutable $view, array &$display, array &$options=NULL)
 
 access (AccountInterface $account=NULL)
 
 calculateCacheMetadata ()
 

Static Public Member Functions

static create (ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition)
 
- Static Public Member Functions inherited from DisplayPluginBase
static buildBasicRenderable ($view_id, $display_id, array $args=[])
 
- Static Public Member Functions inherited from PluginBase
static create (ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition)
 
static preRenderAddFieldsetMarkup (array $form)
 
static preRenderFlattenData ($form)
 
static queryLanguageSubstitutions ()
 

Protected Member Functions

 isDefaultTabPath ()
 
 defineOptions ()
 
 getRoute ($view_id, $display_id)
 
 validatePath ($path)
 
- Protected Member Functions inherited from DisplayPluginBase
 defineOptions ()
 
 getAllHandlers ($only_overrides=FALSE)
 
 getAllPlugins ($only_overrides=FALSE)
 
 mergePlugin ($type)
 
 mergeHandler ($type)
 
 buildRenderingLanguageOptions ()
 
 isBaseTableTranslatable ()
 
- Protected Member Functions inherited from PluginBase
 defineOptions ()
 
 setOptionDefaults (array &$storage, array $options)
 
 doFilterByDefinedOptions (array &$storage, array $options)
 
 viewsTokenReplace ($text, $tokens)
 
 listLanguages ($flags=LanguageInterface::STATE_ALL, array $current_values=NULL)
 
 getRenderer ()
 

Protected Attributes

 $routeProvider
 
 $state
 
- Protected Attributes inherited from DisplayPluginBase
 $plugins = array()
 
 $extenders = []
 
 $usesOptions = TRUE
 
 $usesAJAX = TRUE
 
 $usesPager = TRUE
 
 $usesMore = TRUE
 
 $usesAttachments = FALSE
 
 $usesAreas = TRUE
 
- Protected Attributes inherited from PluginBase
 $usesOptions = FALSE
 
 $renderer
 

Additional Inherited Members

- Data Fields inherited from DisplayPluginBase
 $view = NULL
 
 $handlers = []
 
 $output = NULL
 
 $display
 
- Data Fields inherited from PluginBase
const INCLUDE_NEGOTIATED = 16
 
const INCLUDE_ENTITY = 32
 
const VIEWS_QUERY_LANGUAGE_SITE_DEFAULT = '***LANGUAGE_site_default***'
 
 $options = array()
 
 $view = NULL
 
 $displayHandler
 
 $definition
 
- Static Protected Attributes inherited from DisplayPluginBase
static $unpackOptions = array()
 

Detailed Description

The base display plugin for path/callbacks. This is used for pages and feeds.

See Also

Constructor & Destructor Documentation

__construct ( array  $configuration,
  $plugin_id,
  $plugin_definition,
RouteProviderInterface  $route_provider,
StateInterface  $state 
)

Constructs a PathPluginBase object.

Parameters
array$configurationA configuration array containing information about the plugin instance.
string$plugin_idThe plugin_id for the plugin instance.
mixed$plugin_definitionThe plugin implementation definition.
\Drupal\Core\Routing\RouteProviderInterface$route_providerThe route provider.
\Drupal\Core\State\StateInterface$stateThe state key value store.

References Drupal\state().

Here is the call graph for this function:

Member Function Documentation

alterRoutes ( RouteCollection  $collection)

{Alters a collection of routes and replaces definitions to the view.Most of the collections won't have the needed route, so by the return value the method can specify to break the search.

Parameters
\Symfony\Component\Routing\RouteCollection$collection
Returns
array Returns a list of "$view_id.$display_id" elements which got overridden.
}

Implements DisplayRouterInterface.

References PathPluginBase\getPath(), RouteCompiler\getPathWithoutDefaults(), RouteCompiler\getPatternOutline(), and PathPluginBase\getRoute().

Here is the call graph for this function:

buildOptionsForm ( $form,
FormStateInterface  $form_state 
)

{Provides the default form for setting options.}

Implements DisplayPluginInterface.

References LanguageInterface\DIRECTION_LTR, FormStateInterface\get(), DisplayPluginBase\getOption(), t(), and Drupal\url().

Here is the call graph for this function:

collectRoutes ( RouteCollection  $collection)

{Adds the route entry of a view to the collection.

Parameters
\Symfony\Component\Routing\RouteCollection$collectionA collection of routes that should be registered for this resource.
}

Implements DisplayRouterInterface.

References DisplayPluginBase\getOption(), and PathPluginBase\getRoute().

Here is the call graph for this function:

static create ( ContainerInterface  $container,
array  $configuration,
  $plugin_id,
  $plugin_definition 
)
static

{Creates an instance of the plugin.

Parameters
\Symfony\Component\DependencyInjection\ContainerInterface$containerThe container to pull out services used in the plugin.
array$configurationA configuration array containing information about the plugin instance.
string$plugin_idThe plugin ID for the plugin instance.
mixed$plugin_definitionThe plugin implementation definition.
Returns
static Returns an instance of this plugin.
}

Implements ContainerFactoryPluginInterface.

defineOptions ( )
protected

Overrides :defineOptions().

execute ( )

{Executes the view and returns data in the format required.The base class cannot be executed.}

Implements DisplayPluginInterface.

getAlteredRouteNames ( )

{Returns the list of routes overridden by Views.

Returns
string[] An array of overridden route names. The keys are in the form view_id.display_id and the values are the route names.
See Also
::alterRoutes()
}

Implements DisplayRouterInterface.

References Drupal\state().

Referenced by PathPluginBase\getRouteName().

Here is the call graph for this function:

Here is the caller graph for this function:

getMenuLinks ( )

{Gets menu links, if this display provides some.

Returns
array The menu links registers for this display.
See Also
}

Implements DisplayMenuInterface.

References DisplayPluginBase\getOption(), and PathPluginBase\getRouteName().

Here is the call graph for this function:

getPath ( )

{Returns the base path to use for this display.This can be overridden for displays that do strange things with the path.}

Implements DisplayPluginInterface.

References DisplayPluginBase\getOption(), and PathPluginBase\isDefaultTabPath().

Referenced by PathPluginBase\alterRoutes().

Here is the call graph for this function:

Here is the caller graph for this function:

getRoute (   $view_id,
  $display_id 
)
protected

Generates a route entry for a given view and display.

Parameters
string$view_idThe ID of the view.
string$display_idThe current display ID.
Returns
The route for the view.

References DisplayPluginBase\getOption(), DisplayPluginBase\getPlugin(), PluginInspectionInterface\getPluginDefinition(), PluginInspectionInterface\getPluginId(), PathPluginBase\isDefaultTabPath(), and Views\pluginManager().

Referenced by PathPluginBase\alterRoutes(), and PathPluginBase\collectRoutes().

Here is the call graph for this function:

Here is the caller graph for this function:

getRouteName ( )

{Returns the route name for the display.The default route name for a display is views.$view_id.$display_id. Some displays may override existing routes; in these cases, the route that is overridden is returned instead.

Returns
string The name of the route
See Also
::alterRoutes()
::getAlteredRouteNames()
}

Implements DisplayRouterInterface.

References PathPluginBase\getAlteredRouteNames().

Referenced by PathPluginBase\getMenuLinks(), and PathPluginBase\getUrlInfo().

Here is the call graph for this function:

Here is the caller graph for this function:

getUrlInfo ( )

{Generates an URL to this display.

Returns
A URL object for the display.
}

Implements DisplayRouterInterface.

References Url\fromRoute(), and PathPluginBase\getRouteName().

Here is the call graph for this function:

hasPath ( )

{Checks to see if the display has a 'path' field.This is a pure function and not just a setting on the definition because some displays (such as a panel pane) may have a path based upon configuration.By default, displays do not have a path.}

Implements DisplayPluginInterface.

isDefaultTabPath ( )
protected

Determines if this display's path is a default tab.

Returns
bool TRUE if the display path is for a default tab, FALSE otherwise.

References DisplayPluginBase\getOption().

Referenced by PathPluginBase\getPath(), and PathPluginBase\getRoute().

Here is the call graph for this function:

Here is the caller graph for this function:

optionsSummary ( $categories,
$options 
)

{Provides the default summary for options in the views UI.This output is returned as an array.}

Implements DisplayPluginInterface.

References DisplayPluginBase\getOption(), and t().

Here is the call graph for this function:

submitOptionsForm ( $form,
FormStateInterface  $form_state 
)

{Performs any necessary changes to the form values prior to storage.There is no need for this function to actually store the data.}

Implements DisplayPluginInterface.

References FormStateInterface\get(), FormStateInterface\getValue(), and DisplayPluginBase\setOption().

Here is the call graph for this function:

validate ( )

{Make sure the display and all associated handlers are valid.

Returns
Empty array if the display is valid; an array of error strings if it is not.
}

Implements DisplayPluginInterface.

References DisplayPluginBase\getOption(), and PathPluginBase\validatePath().

Here is the call graph for this function:

validateOptionsForm ( $form,
FormStateInterface  $form_state 
)

{Validates the options form.}

Implements DisplayPluginInterface.

References FormStateInterface\get(), FormStateInterface\getValue(), FormStateInterface\setError(), FormStateInterface\setValue(), and PathPluginBase\validatePath().

Here is the call graph for this function:

validatePath (   $path)
protected

Validates the path of the display.

Parameters
string$pathThe path to validate.
Returns
array A list of error strings.

References UrlHelper\parse(), and t().

Referenced by PathPluginBase\validate(), and PathPluginBase\validateOptionsForm().

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following file: