abstract class PathPluginBase in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/views/src/Plugin/views/display/PathPluginBase.php \Drupal\views\Plugin\views\display\PathPluginBase
The base display plugin for path/callbacks. This is used for pages and feeds.
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, StringTranslationTrait
- class \Drupal\views\Plugin\views\PluginBase implements DependentPluginInterface, ContainerFactoryPluginInterface, ViewsPluginInterface
- class \Drupal\views\Plugin\views\display\DisplayPluginBase implements DependentPluginInterface, DisplayPluginInterface uses PluginDependencyTrait
- class \Drupal\views\Plugin\views\display\PathPluginBase implements DisplayMenuInterface, DisplayRouterInterface uses UrlGeneratorTrait
- class \Drupal\views\Plugin\views\display\DisplayPluginBase implements DependentPluginInterface, DisplayPluginInterface uses PluginDependencyTrait
- class \Drupal\views\Plugin\views\PluginBase implements DependentPluginInterface, ContainerFactoryPluginInterface, ViewsPluginInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, StringTranslationTrait
Expanded class hierarchy of PathPluginBase
See also
\Drupal\views\EventSubscriber\RouteSubscriber
1 file declares its use of PathPluginBase
- RestExport.php in core/
modules/ rest/ src/ Plugin/ views/ display/ RestExport.php - Contains \Drupal\rest\Plugin\views\display\RestExport.
File
- core/
modules/ views/ src/ Plugin/ views/ display/ PathPluginBase.php, line 30 - Contains \Drupal\views\Plugin\views\display\PathPluginBase.
Namespace
Drupal\views\Plugin\views\displayView source
abstract class PathPluginBase extends DisplayPluginBase implements DisplayRouterInterface, DisplayMenuInterface {
use UrlGeneratorTrait;
/**
* The route provider.
*
* @var \Drupal\Core\Routing\RouteProviderInterface
*/
protected $routeProvider;
/**
* The state key value store.
*
* @var \Drupal\Core\State\StateInterface
*/
protected $state;
/**
* Constructs a PathPluginBase object.
*
* @param array $configuration
* A configuration array containing information about the plugin instance.
* @param string $plugin_id
* The plugin_id for the plugin instance.
* @param mixed $plugin_definition
* The plugin implementation definition.
* @param \Drupal\Core\Routing\RouteProviderInterface $route_provider
* The route provider.
* @param \Drupal\Core\State\StateInterface $state
* The state key value store.
*/
public function __construct(array $configuration, $plugin_id, $plugin_definition, RouteProviderInterface $route_provider, StateInterface $state) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->routeProvider = $route_provider;
$this->state = $state;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
return new static($configuration, $plugin_id, $plugin_definition, $container
->get('router.route_provider'), $container
->get('state'));
}
/**
* {@inheritdoc}
*/
public function hasPath() {
return TRUE;
}
/**
* {@inheritdoc}
*/
public function getPath() {
$bits = explode('/', $this
->getOption('path'));
if ($this
->isDefaultTabPath()) {
array_pop($bits);
}
return implode('/', $bits);
}
/**
* Determines if this display's path is a default tab.
*
* @return bool
* TRUE if the display path is for a default tab, FALSE otherwise.
*/
protected function isDefaultTabPath() {
$menu = $this
->getOption('menu');
$tab_options = $this
->getOption('tab_options');
return $menu['type'] == 'default tab' && !empty($tab_options['type']) && $tab_options['type'] != 'none';
}
/**
* Overrides \Drupal\views\Plugin\views\display\DisplayPluginBase:defineOptions().
*/
protected function defineOptions() {
$options = parent::defineOptions();
$options['path'] = array(
'default' => '',
);
$options['route_name'] = array(
'default' => '',
);
return $options;
}
/**
* Generates a route entry for a given view and display.
*
* @param string $view_id
* The ID of the view.
* @param string $display_id
* The current display ID.
*
* @return \Symfony\Component\Routing\Route
* The route for the view.
*/
protected function getRoute($view_id, $display_id) {
$defaults = array(
'_controller' => 'Drupal\\views\\Routing\\ViewPageController::handle',
'_title' => $this->view
->getTitle(),
'view_id' => $view_id,
'display_id' => $display_id,
'_view_display_show_admin_links' => $this
->getOption('show_admin_links'),
);
// @todo How do we apply argument validation?
$bits = explode('/', $this
->getOption('path'));
// @todo Figure out validation/argument loading.
// Replace % with %views_arg for menu autoloading and add to the
// page arguments so the argument actually comes through.
$arg_counter = 0;
$argument_ids = array_keys((array) $this
->getOption('arguments'));
$total_arguments = count($argument_ids);
$argument_map = array();
// Replace arguments in the views UI (defined via %) with parameters in
// routes (defined via {}). As a name for the parameter use arg_$key, so
// it can be pulled in the views controller from the request.
foreach ($bits as $pos => $bit) {
if ($bit == '%') {
// Generate the name of the parameter using the key of the argument
// handler.
$arg_id = 'arg_' . $arg_counter++;
$bits[$pos] = '{' . $arg_id . '}';
$argument_map[$arg_id] = $arg_id;
}
elseif (strpos($bit, '%') === 0) {
// Use the name defined in the path.
$parameter_name = substr($bit, 1);
$arg_id = 'arg_' . $arg_counter++;
$argument_map[$arg_id] = $parameter_name;
$bits[$pos] = '{' . $parameter_name . '}';
}
}
// Add missing arguments not defined in the path, but added as handler.
while ($total_arguments - $arg_counter > 0) {
$arg_id = 'arg_' . $arg_counter++;
$bit = '{' . $arg_id . '}';
// In contrast to the previous loop add the defaults here, as % was not
// specified, which means the argument is optional.
$defaults[$arg_id] = NULL;
$argument_map[$arg_id] = $arg_id;
$bits[] = $bit;
}
// If this is to be a default tab, create the route for the parent path.
if ($this
->isDefaultTabPath()) {
$bit = array_pop($bits);
if (empty($bits)) {
$bits[] = $bit;
}
}
$route_path = '/' . implode('/', $bits);
$route = new Route($route_path, $defaults);
// Add access check parameters to the route.
$access_plugin = $this
->getPlugin('access');
if (!isset($access_plugin)) {
// @todo Do we want to support a default plugin in getPlugin itself?
$access_plugin = Views::pluginManager('access')
->createInstance('none');
}
$access_plugin
->alterRouteDefinition($route);
// Set the argument map, in order to support named parameters.
$route
->setOption('_view_argument_map', $argument_map);
$route
->setOption('_view_display_plugin_id', $this
->getPluginId());
$route
->setOption('_view_display_plugin_class', get_called_class());
$route
->setOption('_view_display_show_admin_links', $this
->getOption('show_admin_links'));
// Store whether the view will return a response.
$route
->setOption('returns_response', !empty($this
->getPluginDefinition()['returns_response']));
return $route;
}
/**
* {@inheritdoc}
*/
public function collectRoutes(RouteCollection $collection) {
$view_id = $this->view->storage
->id();
$display_id = $this->display['id'];
$route = $this
->getRoute($view_id, $display_id);
if (!($route_name = $this
->getOption('route_name'))) {
$route_name = "view.{$view_id}.{$display_id}";
}
$collection
->add($route_name, $route);
return array(
"{$view_id}.{$display_id}" => $route_name,
);
}
/**
* {@inheritdoc}
*/
public function alterRoutes(RouteCollection $collection) {
$view_route_names = array();
$view_path = $this
->getPath();
foreach ($collection
->all() as $name => $route) {
// Find all paths which match the path of the current display..
$route_path = RouteCompiler::getPathWithoutDefaults($route);
$route_path = RouteCompiler::getPatternOutline($route_path);
// Ensure that we don't override a route which is already controlled by
// views.
if (!$route
->hasDefault('view_id') && '/' . $view_path == $route_path) {
$parameters = $route
->compile()
->getPathVariables();
// @todo Figure out whether we need to merge some settings (like
// requirements).
// Replace the existing route with a new one based on views.
$original_route = $collection
->get($name);
$collection
->remove($name);
$view_id = $this->view->storage
->id();
$display_id = $this->display['id'];
$route = $this
->getRoute($view_id, $display_id);
$path = $route
->getPath();
// Replace the path with the original parameter names and add a mapping.
$argument_map = array();
// We assume that the numeric ids of the parameters match the one from
// the view argument handlers.
foreach ($parameters as $position => $parameter_name) {
$path = str_replace('{arg_' . $position . '}', '{' . $parameter_name . '}', $path);
$argument_map['arg_' . $position] = $parameter_name;
}
// Copy the original options from the route, so for example we ensure
// that parameter conversion options is carried over.
$route
->setOptions($route
->getOptions() + $original_route
->getOptions());
// Set the corrected path and the mapping to the route object.
$route
->setOption('_view_argument_map', $argument_map);
$route
->setPath($path);
$collection
->add($name, $route);
$view_route_names[$view_id . '.' . $display_id] = $name;
}
}
return $view_route_names;
}
/**
* {@inheritdoc}
*/
public function getMenuLinks() {
$links = array();
// Replace % with the link to our standard views argument loader
// views_arg_load -- which lives in views.module.
$bits = explode('/', $this
->getOption('path'));
// Replace % with %views_arg for menu autoloading and add to the
// page arguments so the argument actually comes through.
foreach ($bits as $pos => $bit) {
if ($bit == '%') {
// If a view requires any arguments we cannot create a static menu link.
return array();
}
}
$path = implode('/', $bits);
$view_id = $this->view->storage
->id();
$display_id = $this->display['id'];
$view_id_display = "{$view_id}.{$display_id}";
$menu_link_id = 'views.' . str_replace('/', '.', $view_id_display);
if ($path) {
$menu = $this
->getOption('menu');
if (!empty($menu['type']) && $menu['type'] == 'normal') {
$links[$menu_link_id] = array();
// Some views might override existing paths, so we have to set the route
// name based upon the altering.
$links[$menu_link_id] = array(
'route_name' => $this
->getRouteName(),
// Identify URL embedded arguments and correlate them to a handler.
'load arguments' => array(
$this->view->storage
->id(),
$this->display['id'],
'%index',
),
'id' => $menu_link_id,
);
$links[$menu_link_id]['title'] = $menu['title'];
$links[$menu_link_id]['description'] = $menu['description'];
$links[$menu_link_id]['parent'] = $menu['parent'];
if (isset($menu['weight'])) {
$links[$menu_link_id]['weight'] = intval($menu['weight']);
}
// Insert item into the proper menu.
$links[$menu_link_id]['menu_name'] = $menu['menu_name'];
// Keep track of where we came from.
$links[$menu_link_id]['metadata'] = array(
'view_id' => $view_id,
'display_id' => $display_id,
);
}
}
return $links;
}
/**
* {@inheritdoc}
*/
public function execute() {
// Prior to this being called, the $view should already be set to this
// display, and arguments should be set on the view.
$this->view
->build();
if (!empty($this->view->build_info['fail'])) {
throw new NotFoundHttpException();
}
if (!empty($this->view->build_info['denied'])) {
throw new AccessDeniedHttpException();
}
}
/**
* {@inheritdoc}
*/
public function optionsSummary(&$categories, &$options) {
parent::optionsSummary($categories, $options);
$categories['page'] = array(
'title' => $this
->t('Page settings'),
'column' => 'second',
'build' => array(
'#weight' => -10,
),
);
$path = strip_tags($this
->getOption('path'));
if (empty($path)) {
$path = $this
->t('No path is set');
}
else {
$path = '/' . $path;
}
$options['path'] = array(
'category' => 'page',
'title' => $this
->t('Path'),
'value' => views_ui_truncate($path, 24),
);
}
/**
* {@inheritdoc}
*/
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
parent::buildOptionsForm($form, $form_state);
switch ($form_state
->get('section')) {
case 'path':
$form['#title'] .= $this
->t('The menu path or URL of this view');
$form['path'] = array(
'#type' => 'textfield',
'#title' => $this
->t('Path'),
'#description' => $this
->t('This view will be displayed by visiting this path on your site. You may use "%" in your URL to represent values that will be used for contextual filters: For example, "node/%/feed". If needed you can even specify named route parameters like taxonomy/term/%taxonomy_term'),
'#default_value' => $this
->getOption('path'),
'#field_prefix' => '<span dir="ltr">' . $this
->url('<none>', [], [
'absolute' => TRUE,
]),
'#field_suffix' => '</span>‎',
'#attributes' => array(
'dir' => LanguageInterface::DIRECTION_LTR,
),
// Account for the leading backslash.
'#maxlength' => 254,
);
break;
}
}
/**
* {@inheritdoc}
*/
public function validateOptionsForm(&$form, FormStateInterface $form_state) {
parent::validateOptionsForm($form, $form_state);
if ($form_state
->get('section') == 'path') {
$errors = $this
->validatePath($form_state
->getValue('path'));
foreach ($errors as $error) {
$form_state
->setError($form['path'], $error);
}
// Automatically remove '/' and trailing whitespace from path.
$form_state
->setValue('path', trim($form_state
->getValue('path'), '/ '));
}
}
/**
* {@inheritdoc}
*/
public function submitOptionsForm(&$form, FormStateInterface $form_state) {
parent::submitOptionsForm($form, $form_state);
if ($form_state
->get('section') == 'path') {
$this
->setOption('path', $form_state
->getValue('path'));
}
}
/**
* Validates the path of the display.
*
* @param string $path
* The path to validate.
*
* @return array
* A list of error strings.
*/
protected function validatePath($path) {
$errors = array();
if (strpos($path, '%') === 0) {
$errors[] = $this
->t('"%" may not be used for the first segment of a path.');
}
$parsed_url = UrlHelper::parse($path);
if (empty($parsed_url['path'])) {
$errors[] = $this
->t('Path is empty.');
}
if (!empty($parsed_url['query'])) {
$errors[] = $this
->t('No query allowed.');
}
if (!parse_url('internal:/' . $path)) {
$errors[] = $this
->t('Invalid path. Valid characters are alphanumerics as well as "-", ".", "_" and "~".');
}
$path_sections = explode('/', $path);
// Symfony routing does not allow to use numeric placeholders.
// @see \Symfony\Component\Routing\RouteCompiler
$numeric_placeholders = array_filter($path_sections, function ($section) {
return preg_match('/^%(.*)/', $section, $matches) && is_numeric($matches[1]);
});
if (!empty($numeric_placeholders)) {
$errors[] = $this
->t("Numeric placeholders may not be used. Please use plain placeholders (%).");
}
return $errors;
}
/**
* {@inheritdoc}
*/
public function validate() {
$errors = parent::validate();
$errors += $this
->validatePath($this
->getOption('path'));
return $errors;
}
/**
* {@inheritdoc}
*/
public function getUrlInfo() {
return Url::fromRoute($this
->getRouteName());
}
/**
* {@inheritdoc}
*/
public function getRouteName() {
$view_id = $this->view->storage
->id();
$display_id = $this->display['id'];
$view_route_key = "{$view_id}.{$display_id}";
// Check for overridden route names.
$view_route_names = $this
->getAlteredRouteNames();
return isset($view_route_names[$view_route_key]) ? $view_route_names[$view_route_key] : "view.{$view_route_key}";
}
/**
* {@inheritdoc}
*/
public function getAlteredRouteNames() {
return $this->state
->get('views.view_route_names') ?: array();
}
/**
* {@inheritdoc}
*/
public function remove() {
$menu_links = $this
->getMenuLinks();
/** @var \Drupal\Core\Menu\MenuLinkManagerInterface $menu_link_manager */
$menu_link_manager = \Drupal::service('plugin.manager.menu.link');
foreach ($menu_links as $menu_link_id => $menu_link) {
$menu_link_manager
->removeDefinition("views_view:{$menu_link_id}");
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DependencySerializationTrait:: |
protected | property | An array of service IDs keyed by property name used for serialization. | |
DependencySerializationTrait:: |
public | function | 1 | |
DependencySerializationTrait:: |
public | function | 2 | |
DependencyTrait:: |
protected | property | The object's dependencies. | 1 |
DependencyTrait:: |
protected | function | Adds multiple dependencies. | |
DependencyTrait:: |
protected | function | Adds a dependency. | |
DisplayPluginBase:: |
public | property | The display information coming directly from the view entity. | |
DisplayPluginBase:: |
protected | property | Stores all available display extenders. | |
DisplayPluginBase:: |
public | property | An array of instantiated handlers used in this display. | |
DisplayPluginBase:: |
public | property | Stores the rendered output of the display. | |
DisplayPluginBase:: |
protected | property | An array of instantiated plugins used in this display. | |
DisplayPluginBase:: |
protected static | property | Static cache for unpackOptions, but not if we are in the UI. | |
DisplayPluginBase:: |
protected | property | Whether the display allows the use of AJAX or not. | 2 |
DisplayPluginBase:: |
protected | property | Whether the display allows area plugins. | 2 |
DisplayPluginBase:: |
protected | property | Whether the display allows attachments. | 5 |
DisplayPluginBase:: |
protected | property | Whether the display allows the use of a 'more' link or not. | 1 |
DisplayPluginBase:: |
protected | property |
Denotes whether the plugin has an additional options form. Overrides PluginBase:: |
1 |
DisplayPluginBase:: |
protected | property | Whether the display allows the use of a pager or not. | 4 |
DisplayPluginBase:: |
property |
The top object of a view. Overrides PluginBase:: |
||
DisplayPluginBase:: |
public | function |
Determines whether this display can use attachments. Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
public | function |
Determines if the user has access to this display of the view. Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
public | function |
Whether the display is actually using AJAX or not. Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
protected | function | Applies the cacheability of the current display to the given render array. | |
DisplayPluginBase:: |
public | function |
Allows displays to attach to other views. Overrides DisplayPluginInterface:: |
2 |
DisplayPluginBase:: |
public static | function |
Builds a basic render array which can be properly render cached. Overrides DisplayPluginInterface:: |
1 |
DisplayPluginBase:: |
public | function |
Builds a renderable array of the view. Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
protected | function | Returns the available rendering strategies for language-aware entities. | |
DisplayPluginBase:: |
public | function |
Calculates the display's cache metadata by inspecting each handler/plugin. Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
public | function |
Calculates dependencies for the configured plugin. Overrides PluginBase:: |
2 |
DisplayPluginBase:: |
public | function |
Lists the 'defaultable' sections and what items each section contains. Overrides DisplayPluginInterface:: |
1 |
DisplayPluginBase:: |
public | function |
Clears a plugin. Overrides PluginBase:: |
|
DisplayPluginBase:: |
public | function |
Determines if this display should display the exposed filters widgets. Overrides DisplayPluginInterface:: |
2 |
DisplayPluginBase:: |
public | function |
#pre_render callback for view display rendering. Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
protected | function | Gets all the handlers used by the display. | |
DisplayPluginBase:: |
protected | function | Gets all the plugins used by the display. | |
DisplayPluginBase:: |
public | function |
Returns to tokens for arguments. Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
public | function |
Provides help text for the arguments. Overrides DisplayPluginInterface:: |
1 |
DisplayPluginBase:: |
public | function |
Find out all displays which are attached to this display. Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
public | function |
Gets the cache metadata. Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
public | function |
Gets the display extenders. Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
public | function |
Retrieves a list of fields for the current display. Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
public | function |
Get the handler object for a single handler. Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
public | function |
Get a full array of handlers for $type. This caches them. Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
public | function |
Returns the ID of the display to use when making links. Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
public | function |
Gets an option, from this display or the default display. Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
public | function |
Provides help text for pagers. Overrides DisplayPluginInterface:: |
1 |
DisplayPluginBase:: |
public | function |
Get the instance of a plugin, for example style or row. Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
public | function |
Points to the display which can be linked by this display. Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
public | function |
Provides the block system with any exposed widget blocks for this display. Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
public | function |
Returns the display type that this display requires. Overrides DisplayPluginInterface:: |
4 |
DisplayPluginBase:: |
public | function |
Returns a URL to $this display or its configured linked display. Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
public | function |
Initializes the display plugin. Overrides DisplayPluginInterface:: |
1 |
DisplayPluginBase:: |
protected | function | Returns whether the base table is of a translatable entity type. | |
DisplayPluginBase:: |
public | function |
Determines if this display is the 'default' display. Overrides DisplayPluginInterface:: |
1 |
DisplayPluginBase:: |
public | function |
Determines if an option is set to use the default or current display. Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
public | function |
Whether the display is enabled. Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
public | function |
Checks if the provided identifier is unique. Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
public | function |
Whether the display is using the 'more' link or not. Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
public | function |
Whether the display is using a pager or not. Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
public | function |
Merges default values for all plugin types. Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
protected | function | Merges handlers default values. | |
DisplayPluginBase:: |
protected | function | Merges plugins default values. | |
DisplayPluginBase:: |
public | function |
Reacts on adding a display. Overrides DisplayPluginInterface:: |
1 |
DisplayPluginBase:: |
public | function |
Returns a link to a section of a form. Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
public | function |
If override/revert was clicked, perform the proper toggle. Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
public | function |
Is the output of the view empty. Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
public | function |
Set an option and force it to be an override. Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
public | function |
Sets up any variables on the view prior to execution. Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
function |
Renders the display for the purposes of a live preview. Overrides DisplayPluginInterface:: |
3 | |
DisplayPluginBase:: |
public | function |
Add anything to the query that we might need to. Overrides PluginBase:: |
1 |
DisplayPluginBase:: |
public | function |
Renders this display. Overrides DisplayPluginInterface:: |
3 |
DisplayPluginBase:: |
public | function |
Renders one of the available areas. Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
public | function |
Does nothing (obsolete function). Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
public | function |
Renders the 'more' link. Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
public | function |
Checks to see if the display plugins support pager rendering. Overrides DisplayPluginInterface:: |
1 |
DisplayPluginBase:: |
public | function |
Sets an option, on this display or the default display. Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
public | function |
Flip the override setting for the given section. Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
public | function |
Does the display have groupby enabled? Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
public | function |
Should the enabled display more link be shown when no more items? Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
public | function |
Does the display have custom link text? Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
public | function |
Whether the display allows the use of AJAX or not. Overrides DisplayPluginInterface:: |
2 |
DisplayPluginBase:: |
public | function |
Returns whether the display can use areas. Overrides DisplayPluginInterface:: |
2 |
DisplayPluginBase:: |
public | function |
Returns whether the display can use attachments. Overrides DisplayPluginInterface:: |
5 |
DisplayPluginBase:: |
public | function |
Determines if this display uses exposed filters. Overrides DisplayPluginInterface:: |
4 |
DisplayPluginBase:: |
public | function |
Checks to see if the display can put the exposed form in a block. Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
public | function |
Determines if the display's style uses fields. Overrides DisplayPluginInterface:: |
|
DisplayPluginBase:: |
public | function |
Checks to see if the display has some need to link to another display. Overrides DisplayPluginInterface:: |
1 |
DisplayPluginBase:: |
public | function |
Whether the display allows the use of a 'more' link or not. Overrides DisplayPluginInterface:: |
1 |
DisplayPluginBase:: |
public | function |
Whether the display allows the use of a pager or not. Overrides DisplayPluginInterface:: |
4 |
DisplayPluginBase:: |
public | function |
Renders the exposed form as block. Overrides DisplayPluginInterface:: |
|
PathPluginBase:: |
protected | property | The route provider. | |
PathPluginBase:: |
protected | property | The state key value store. | |
PathPluginBase:: |
public | function |
Alters a collection of routes and replaces definitions to the view. Overrides DisplayRouterInterface:: |
|
PathPluginBase:: |
public | function |
Provide a form to edit options for this plugin. Overrides DisplayPluginBase:: |
2 |
PathPluginBase:: |
public | function |
Adds the route entry of a view to the collection. Overrides DisplayRouterInterface:: |
1 |
PathPluginBase:: |
public static | function |
Creates an instance of the plugin. Overrides PluginBase:: |
2 |
PathPluginBase:: |
protected | function |
Overrides \Drupal\views\Plugin\views\display\DisplayPluginBase:defineOptions(). Overrides DisplayPluginBase:: |
3 |
PathPluginBase:: |
public | function |
Executes the view and returns data in the format required. Overrides DisplayPluginBase:: |
3 |
PathPluginBase:: |
public | function |
Returns the list of routes overridden by Views. Overrides DisplayRouterInterface:: |
|
PathPluginBase:: |
public | function |
Gets menu links, if this display provides some. Overrides DisplayMenuInterface:: |
|
PathPluginBase:: |
public | function |
Returns the base path to use for this display. Overrides DisplayPluginBase:: |
|
PathPluginBase:: |
protected | function | Generates a route entry for a given view and display. | |
PathPluginBase:: |
public | function |
Returns the route name for the display. Overrides DisplayRouterInterface:: |
|
PathPluginBase:: |
public | function |
Generates an URL to this display. Overrides DisplayRouterInterface:: |
|
PathPluginBase:: |
public | function |
Checks to see if the display has a 'path' field. Overrides DisplayPluginBase:: |
|
PathPluginBase:: |
protected | function | Determines if this display's path is a default tab. | |
PathPluginBase:: |
public | function |
Provides the default summary for options in the views UI. Overrides DisplayPluginBase:: |
3 |
PathPluginBase:: |
public | function |
Reacts on deleting a display. Overrides DisplayPluginBase:: |
|
PathPluginBase:: |
public | function |
Handle any special handling on the validate form. Overrides DisplayPluginBase:: |
2 |
PathPluginBase:: |
public | function |
Validate that the plugin is correct and can be saved. Overrides DisplayPluginBase:: |
1 |
PathPluginBase:: |
public | function |
Validate the options form. Overrides DisplayPluginBase:: |
1 |
PathPluginBase:: |
protected | function | Validates the path of the display. | |
PathPluginBase:: |
public | function |
Constructs a PathPluginBase object. Overrides DisplayPluginBase:: |
2 |
PluginBase:: |
protected | property | Configuration information passed into the plugin. | 2 |
PluginBase:: |
public | property | Plugins's definition | |
PluginBase:: |
public | property | The display object this plugin is for. | |
PluginBase:: |
public | property | Options for this plugin will be held here. | |
PluginBase:: |
protected | property | The plugin implementation definition. | |
PluginBase:: |
protected | property | The plugin_id. | |
PluginBase:: |
protected | property | Stores the render API renderer. | 2 |
PluginBase:: |
constant | A string which is used to separate base plugin IDs from the derivative ID. | ||
PluginBase:: |
protected | function | Do the work to filter out stored options depending on the defined options. | |
PluginBase:: |
public | function |
Filter out stored options depending on the defined options. Overrides ViewsPluginInterface:: |
|
PluginBase:: |
public | function |
Returns an array of available token replacements. Overrides ViewsPluginInterface:: |
|
PluginBase:: |
public | function |
Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the definition of the plugin implementation. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function |
Returns the plugin provider. Overrides ViewsPluginInterface:: |
|
PluginBase:: |
protected | function | Returns the render API renderer. | 1 |
PluginBase:: |
public | function |
Adds elements for available core tokens to a form. Overrides ViewsPluginInterface:: |
|
PluginBase:: |
public | function |
Returns a string with any core tokens replaced. Overrides ViewsPluginInterface:: |
|
PluginBase:: |
constant | Include entity row languages when listing languages. | ||
PluginBase:: |
constant | Include negotiated languages when listing languages. | ||
PluginBase:: |
public | function |
Initialize the plugin. Overrides ViewsPluginInterface:: |
8 |
PluginBase:: |
protected | function | Makes an array of languages, optionally including special languages. | |
PluginBase:: |
public | function |
Return the human readable name of the display. Overrides ViewsPluginInterface:: |
|
PluginBase:: |
public static | function |
Moves form elements into fieldsets for presentation purposes. Overrides ViewsPluginInterface:: |
|
PluginBase:: |
public static | function |
Flattens the structure of form elements. Overrides ViewsPluginInterface:: |
|
PluginBase:: |
public static | function | Returns substitutions for Views queries for languages. | |
PluginBase:: |
protected | function | Fills up the options of the plugin with defaults. | |
PluginBase:: |
public | function |
Returns the summary of the settings in the display. Overrides ViewsPluginInterface:: |
6 |
PluginBase:: |
public | function |
Provide a full list of possible theme templates used by this style. Overrides ViewsPluginInterface:: |
1 |
PluginBase:: |
public | function |
Unpack options over our existing defaults, drilling down into arrays
so that defaults don't get totally blown away. Overrides ViewsPluginInterface:: |
|
PluginBase:: |
public | function |
Returns the usesOptions property. Overrides ViewsPluginInterface:: |
8 |
PluginBase:: |
protected | function | Replaces Views' tokens in a given string. The resulting string will be sanitized with Xss::filterAdmin. | 1 |
PluginBase:: |
constant | Query string to indicate the site default language. | ||
PluginDependencyTrait:: |
protected | function | Calculates and adds dependencies of a specific plugin instance. | 1 |
StringTranslationTrait:: |
protected | property | The string translation service. | |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. | |
UrlGeneratorTrait:: |
protected | property | The url generator. | |
UrlGeneratorTrait:: |
protected | function | Returns the URL generator service. | |
UrlGeneratorTrait:: |
protected | function | Returns a redirect response object for the specified route. | |
UrlGeneratorTrait:: |
public | function | Sets the URL generator service. | |
UrlGeneratorTrait:: |
protected | function | Generates a URL or path for a specific route based on the given parameters. |