class Block in Chaos Tool Suite (ctools) 8.3
Provides a Block display plugin.
Allows for greater control over Views block settings.
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, MessengerTrait, StringTranslationTrait
- class \Drupal\views\Plugin\views\PluginBase implements DependentPluginInterface, ContainerFactoryPluginInterface, TrustedCallbackInterface, ViewsPluginInterface
- class \Drupal\views\Plugin\views\display\DisplayPluginBase implements DependentPluginInterface, DisplayPluginInterface uses PluginDependencyTrait
- class \Drupal\views\Plugin\views\display\Block uses DeprecatedServicePropertyTrait
- class \Drupal\ctools_views\Plugin\Display\Block
- class \Drupal\views\Plugin\views\display\Block uses DeprecatedServicePropertyTrait
- class \Drupal\views\Plugin\views\display\DisplayPluginBase implements DependentPluginInterface, DisplayPluginInterface uses PluginDependencyTrait
- class \Drupal\views\Plugin\views\PluginBase implements DependentPluginInterface, ContainerFactoryPluginInterface, TrustedCallbackInterface, ViewsPluginInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, MessengerTrait, StringTranslationTrait
Expanded class hierarchy of Block
1 file declares its use of Block
- ctools_views.module in modules/
ctools_views/ ctools_views.module - Allows core Views to have greater control over Blocks.
File
- modules/
ctools_views/ src/ Plugin/ Display/ Block.php, line 19
Namespace
Drupal\ctools_views\Plugin\DisplayView source
class Block extends CoreBlock {
/**
* The views filter plugin manager.
*
* @var \Drupal\views\Plugin\ViewsHandlerManager
*/
protected $filterManager;
/**
* The current request.
*
* @var \Symfony\Component\HttpFoundation\Request
*/
protected $request;
/**
* Constructs a new Block instance.
*
* @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\Entity\EntityTypeManagerInterface $entity_type_manager
* The entity manager.
* @param \Drupal\Core\Block\BlockManagerInterface $block_manager
* The block manager.
* @param \Drupal\views\Plugin\ViewsHandlerManager $filter_manager
* The views filter plugin manager.
* @param \Symfony\Component\HttpFoundation\Request $request
* The current request.
*/
public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, BlockManagerInterface $block_manager, ViewsHandlerManager $filter_manager, Request $request) {
parent::__construct($configuration, $plugin_id, $plugin_definition, $entity_type_manager, $block_manager);
$this->filterManager = $filter_manager;
$this->request = $request;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
return new static($configuration, $plugin_id, $plugin_definition, $container
->get('entity_type.manager'), $container
->get('plugin.manager.block'), $container
->get('plugin.manager.views.filter'), $container
->get('request_stack')
->getCurrentRequest());
}
/**
* {@inheritdoc}
*/
public function optionsSummary(&$categories, &$options) {
parent::optionsSummary($categories, $options);
$filtered_allow = array_filter($this
->getOption('allow'));
$filter_options = [
'items_per_page' => $this
->t('Items per page'),
'offset' => $this
->t('Pager offset'),
'pager' => $this
->t('Pager type'),
'hide_fields' => $this
->t('Hide fields'),
'sort_fields' => $this
->t('Reorder fields'),
'disable_filters' => $this
->t('Disable filters'),
'configure_sorts' => $this
->t('Configure sorts'),
];
$filter_intersect = array_intersect_key($filter_options, $filtered_allow);
$options['allow'] = [
'category' => 'block',
'title' => $this
->t('Allow settings'),
'value' => empty($filtered_allow) ? $this
->t('None') : implode(', ', $filter_intersect),
];
}
/**
* {@inheritdoc}
*/
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
parent::buildOptionsForm($form, $form_state);
$form['allow']['#options']['offset'] = $this
->t('Pager offset');
$form['allow']['#options']['pager'] = $this
->t('Pager type');
$form['allow']['#options']['hide_fields'] = $this
->t('Hide fields');
$form['allow']['#options']['sort_fields'] = $this
->t('Reorder fields');
$form['allow']['#options']['disable_filters'] = $this
->t('Disable filters');
$form['allow']['#options']['configure_sorts'] = $this
->t('Configure sorts');
$defaults = [];
if (!empty($form['allow']['#default_value'])) {
$defaults = array_filter($form['allow']['#default_value']);
if (!empty($defaults['items_per_page'])) {
$defaults['items_per_page'] = 'items_per_page';
}
}
$form['allow']['#default_value'] = $defaults;
}
/**
* {@inheritdoc}
*/
public function blockForm(ViewsBlock $block, array &$form, FormStateInterface $form_state) {
$form = parent::blockForm($block, $form, $form_state);
$allow_settings = array_filter($this
->getOption('allow'));
$block_configuration = $block
->getConfiguration();
// Modify "Items per page" block settings form.
if (!empty($allow_settings['items_per_page'])) {
// Items per page.
$form['override']['items_per_page']['#type'] = 'number';
unset($form['override']['items_per_page']['#options']);
}
// Provide "Pager offset" block settings form.
if (!empty($allow_settings['offset'])) {
$form['override']['pager_offset'] = [
'#type' => 'number',
'#title' => $this
->t('Pager offset'),
'#default_value' => isset($block_configuration['pager_offset']) ? $block_configuration['pager_offset'] : 0,
'#description' => $this
->t('For example, set this to 3 and the first 3 items will not be displayed.'),
];
}
// Provide "Pager type" block settings form.
if (!empty($allow_settings['pager'])) {
$pager_options = [
'view' => $this
->t('Inherit from view'),
'some' => $this
->t('Display a specified number of items'),
'none' => $this
->t('Display all items'),
];
$form['override']['pager'] = [
'#type' => 'radios',
'#title' => $this
->t('Pager'),
'#options' => $pager_options,
'#default_value' => isset($block_configuration['pager']) ? $block_configuration['pager'] : 'view',
];
}
// Provide "Hide fields" / "Reorder fields" block settings form.
if (!empty($allow_settings['hide_fields']) || !empty($allow_settings['sort_fields'])) {
// Set up the configuration table for hiding / sorting fields.
$fields = $this
->getHandlers('field');
$header = [];
if (!empty($allow_settings['hide_fields'])) {
$header['hide'] = $this
->t('Hide');
}
$header['label'] = $this
->t('Label');
if (!empty($allow_settings['sort_fields'])) {
$header['weight'] = $this
->t('Weight');
}
$form['override']['order_fields'] = [
'#type' => 'table',
'#header' => $header,
'#rows' => [],
];
if (!empty($allow_settings['sort_fields'])) {
$form['override']['order_fields']['#tabledrag'] = [
[
'action' => 'order',
'relationship' => 'sibling',
'group' => 'field-weight',
],
];
$form['override']['order_fields']['#attributes'] = [
'id' => 'order-fields',
];
}
// Sort available field plugins by their currently configured weight.
$sorted_fields = [];
if (!empty($allow_settings['sort_fields']) && isset($block_configuration['fields'])) {
uasort($block_configuration['fields'], '\\Drupal\\ctools_views\\Plugin\\Display\\Block::sortFieldsByWeight');
foreach (array_keys($block_configuration['fields']) as $field_name) {
if (!empty($fields[$field_name])) {
$sorted_fields[$field_name] = $fields[$field_name];
unset($fields[$field_name]);
}
}
if (!empty($fields)) {
foreach ($fields as $field_name => $field_info) {
$sorted_fields[$field_name] = $field_info;
}
}
}
else {
$sorted_fields = $fields;
}
// Add each field to the configuration table.
foreach ($sorted_fields as $field_name => $plugin) {
$field_label = $plugin
->adminLabel();
if (!empty($plugin->options['label'])) {
$field_label .= ' (' . $plugin->options['label'] . ')';
}
if (!empty($allow_settings['sort_fields'])) {
$form['override']['order_fields'][$field_name]['#attributes']['class'][] = 'draggable';
}
$form['override']['order_fields'][$field_name]['#weight'] = !empty($block_configuration['fields'][$field_name]['weight']) ? $block_configuration['fields'][$field_name]['weight'] : 0;
if (!empty($allow_settings['hide_fields'])) {
$form['override']['order_fields'][$field_name]['hide'] = [
'#type' => 'checkbox',
'#default_value' => !empty($block_configuration['fields'][$field_name]['hide']) ? $block_configuration['fields'][$field_name]['hide'] : 0,
];
}
$form['override']['order_fields'][$field_name]['label'] = [
'#markup' => $field_label,
];
if (!empty($allow_settings['sort_fields'])) {
$form['override']['order_fields'][$field_name]['weight'] = [
'#type' => 'weight',
'#title' => $this
->t('Weight for @title', [
'@title' => $field_label,
]),
'#title_display' => 'invisible',
'#delta' => 50,
'#default_value' => !empty($block_configuration['fields'][$field_name]['weight']) ? $block_configuration['fields'][$field_name]['weight'] : 0,
'#attributes' => [
'class' => [
'field-weight',
],
],
];
}
}
}
// Provide "Configure filters" / "Disable filters" block settings form.
if (!empty($allow_settings['disable_filters'])) {
$items = [];
foreach ((array) $this
->getOption('filters') as $filter_name => $item) {
$item['value'] = isset($block_configuration["filter"][$filter_name]['value']) ? $block_configuration["filter"][$filter_name]['value'] : '';
$items[$filter_name] = $item;
}
$this
->setOption('filters', $items);
$filters = $this
->getHandlers('filter');
// Add a settings form for each exposed filter to configure or hide it.
foreach ($filters as $filter_name => $plugin) {
if ($plugin
->isExposed() && ($exposed_info = $plugin
->exposedInfo())) {
$form['override']['filters'][$filter_name] = [
'#type' => 'details',
'#title' => $exposed_info['label'],
];
$form['override']['filters'][$filter_name]['plugin'] = [
'#type' => 'value',
'#value' => $plugin,
];
// Render "Disable filters" settings form.
if (!empty($allow_settings['disable_filters'])) {
$form['override']['filters'][$filter_name]['disable'] = [
'#type' => 'checkbox',
'#title' => $this
->t('Disable'),
'#default_value' => !empty($block_configuration['filter'][$filter_name]['disable']) ? $block_configuration['filter'][$filter_name]['disable'] : 0,
];
}
}
}
}
// Provide "Configure sorts" block settings form.
if (!empty($allow_settings['configure_sorts'])) {
$sorts = $this
->getHandlers('sort');
$options = [
'ASC' => $this
->t('Sort ascending'),
'DESC' => $this
->t('Sort descending'),
];
foreach ($sorts as $sort_name => $plugin) {
$form['override']['sort'][$sort_name] = [
'#type' => 'details',
'#title' => $plugin
->adminLabel(),
];
$form['override']['sort'][$sort_name]['plugin'] = [
'#type' => 'value',
'#value' => $plugin,
];
$form['override']['sort'][$sort_name]['order'] = [
'#title' => $this
->t('Order'),
'#type' => 'radios',
'#options' => $options,
'#default_value' => $plugin->options['order'],
];
// Set default values for sorts for this block.
if (!empty($block_configuration["sort"][$sort_name])) {
$form['override']['sort'][$sort_name]['order']['#default_value'] = $block_configuration["sort"][$sort_name];
}
}
}
return $form;
}
/**
* {@inheritdoc}
*/
public function blockSubmit(ViewsBlock $block, $form, FormStateInterface $form_state) {
// Set default value for items_per_page if left blank.
if (empty($form_state
->getValue([
'override',
'items_per_page',
]))) {
$form_state
->setValue([
'override',
'items_per_page',
], "none");
}
parent::blockSubmit($block, $form, $form_state);
$configuration = $block
->getConfiguration();
$allow_settings = array_filter($this
->getOption('allow'));
// Save "Pager type" settings to block configuration.
if (!empty($allow_settings['pager'])) {
if ($pager = $form_state
->getValue([
'override',
'pager',
])) {
$configuration['pager'] = $pager;
}
}
// Save "Pager offset" settings to block configuration.
if (!empty($allow_settings['offset'])) {
$configuration['pager_offset'] = $form_state
->getValue([
'override',
'pager_offset',
]);
}
// Save "Hide fields" / "Reorder fields" settings to block configuration.
if (!empty($allow_settings['hide_fields']) || !empty($allow_settings['sort_fields'])) {
if ($fields = array_filter($form_state
->getValue([
'override',
'order_fields',
]))) {
uasort($fields, '\\Drupal\\ctools_views\\Plugin\\Display\\Block::sortFieldsByWeight');
$configuration['fields'] = $fields;
}
}
// Save "Configure filters" / "Disable filters" settings to block
// configuration.
unset($configuration['filter']);
if (!empty($allow_settings['disable_filters'])) {
if ($filters = $form_state
->getValue([
'override',
'filters',
])) {
foreach ($filters as $filter_name => $filter) {
/** @var \Drupal\views\Plugin\views\filter\FilterPluginBase $plugin */
$plugin = $form_state
->getValue([
'override',
'filters',
$filter_name,
'plugin',
]);
$configuration["filter"][$filter_name]['type'] = $plugin
->getPluginId();
// Check if we want to disable this filter.
if (!empty($allow_settings['disable_filters'])) {
$disable = $form_state
->getValue([
'override',
'filters',
$filter_name,
'disable',
]);
// If marked disabled, we don't really care about other stuff.
if ($disable) {
$configuration["filter"][$filter_name]['disable'] = $disable;
continue;
}
}
}
}
}
// Save "Configure sorts" settings to block configuration.
if (!empty($allow_settings['configure_sorts'])) {
$sorts = $form_state
->getValue([
'override',
'sort',
]);
foreach ($sorts as $sort_name => $sort) {
$plugin = $sort['plugin'];
// Check if we want to override the default sort order.
if ($plugin->options['order'] != $sort['order']) {
$configuration['sort'][$sort_name] = $sort['order'];
}
}
}
$block
->setConfiguration($configuration);
}
/**
* {@inheritdoc}
*/
public function preBlockBuild(ViewsBlock $block) {
parent::preBlockBuild($block);
$allow_settings = array_filter($this
->getOption('allow'));
$config = $block
->getConfiguration();
list(, $display_id) = explode('-', $block
->getDerivativeId(), 2);
// Change pager offset settings based on block configuration.
if (!empty($allow_settings['offset']) && isset($config['pager_offset'])) {
$this->view
->setOffset($config['pager_offset']);
}
// Change pager style settings based on block configuration.
if (!empty($allow_settings['pager'])) {
$pager = $this->view->display_handler
->getOption('pager');
if (!empty($config['pager']) && $config['pager'] != 'view') {
$pager['type'] = $config['pager'];
}
$this->view->display_handler
->setOption('pager', $pager);
}
// Change fields output based on block configuration.
if (!empty($allow_settings['hide_fields']) || !empty($allow_settings['sort_fields'])) {
if (!empty($config['fields']) && $this->view
->getStyle()
->usesFields()) {
$fields = $this->view
->getHandlers('field');
uasort($config['fields'], '\\Drupal\\ctools_views\\Plugin\\Display\\Block::sortFieldsByWeight');
$iterate_fields = !empty($allow_settings['sort_fields']) ? $config['fields'] : $fields;
foreach (array_keys($iterate_fields) as $field_name) {
// Remove each field in sequence and re-add them to sort
// appropriately or hide if disabled.
$this->view
->removeHandler($display_id, 'field', $field_name);
if (empty($allow_settings['hide_fields']) || !empty($allow_settings['hide_fields']) && empty($config['fields'][$field_name]['hide'])) {
$this->view
->addHandler($display_id, 'field', $fields[$field_name]['table'], $fields[$field_name]['field'], $fields[$field_name], $field_name);
}
}
}
}
// Change filters output based on block configuration.
if (!empty($allow_settings['disable_filters'])) {
$filters = $this->view
->getHandlers('filter', $display_id);
foreach ($filters as $filter_name => $filter) {
// If we allow disabled filters and this filter is disabled, disable it
// and continue.
if (!empty($allow_settings['disable_filters']) && !empty($config["filter"][$filter_name]['disable'])) {
$this->view
->removeHandler($display_id, 'filter', $filter_name);
continue;
}
}
}
// Change sorts based on block configuration.
if (!empty($allow_settings['configure_sorts'])) {
$sorts = $this->view
->getHandlers('sort', $display_id);
foreach ($sorts as $sort_name => $sort) {
if (!empty($config["sort"][$sort_name])) {
$sort['order'] = $config["sort"][$sort_name];
$this->view
->setHandler($display_id, 'sort', $sort_name, $sort);
}
}
}
}
/**
* Filter options value.
*/
protected function getFilterOptionsValue(array $filter, array $config) {
$plugin_definition = $this->filterManager
->getDefinition($config['type']);
if (is_subclass_of($plugin_definition['class'], '\\Drupal\\views\\Plugin\\views\\filter\\InOperator')) {
return array_values($config['value']);
}
return $config['value'][$filter['expose']['identifier']];
}
/**
* {@inheritdoc}
*/
public function usesExposed() {
$filters = $this
->getHandlers('filter');
foreach ($filters as $filter) {
if ($filter
->isExposed() && !empty($filter
->exposedInfo())) {
return TRUE;
}
}
return FALSE;
}
/**
* Exposed widgets.
*
* Exposed widgets typically only work with ajax in Drupal core, however
* #2605218 totally breaks the rest of the functionality in this display and
* in Core's Block display as well, so we allow non-ajax block views to use
* exposed filters and manually set the #action to the current request uri.
*/
public function elementPreRender(array $element) {
/** @var \Drupal\views\ViewExecutable $view */
$view = $element['#view'];
if (!empty($view->exposed_widgets['#action']) && !$view
->ajaxEnabled()) {
$view->exposed_widgets['#action'] = $this->request
->getRequestUri();
}
return parent::elementPreRender($element);
}
/**
* Sort field config array by weight.
*
* @param int $a
* The field a.
* @param int $b
* The field b.
*
* @return int
* Return the more weight
*/
public static function sortFieldsByWeight($a, $b) {
$a_weight = isset($a['weight']) ? $a['weight'] : 0;
$b_weight = isset($b['weight']) ? $b['weight'] : 0;
if ($a_weight == $b_weight) {
return 0;
}
return $a_weight < $b_weight ? -1 : 1;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Block:: |
protected | property | The block manager. | |
Block:: |
protected | property | ||
Block:: |
protected | property | The entity type manager. | |
Block:: |
protected | property | The views filter plugin manager. | |
Block:: |
protected | property | The current request. | |
Block:: |
protected | property |
Whether the display allows attachments. Overrides DisplayPluginBase:: |
|
Block:: |
public | function |
Adds the configuration form elements specific to this views block plugin. Overrides Block:: |
|
Block:: |
public | function | Returns plugin-specific settings for the block. | |
Block:: |
public | function |
Handles form submission for the views block configuration form. Overrides Block:: |
|
Block:: |
public | function | Handles form validation for the views block configuration form. | |
Block:: |
public | function |
Provide the default form for setting options. Overrides Block:: |
|
Block:: |
public static | function |
Creates an instance of the plugin. Overrides Block:: |
|
Block:: |
protected | function |
Information about options for all kinds of purposes will be held here. Overrides DisplayPluginBase:: |
|
Block:: |
public | function |
Exposed widgets. Overrides DisplayPluginBase:: |
|
Block:: |
public | function |
The display block handler returns the structure necessary for a block. Overrides DisplayPluginBase:: |
|
Block:: |
protected | function | Filter options value. | |
Block:: |
public | function |
Provide the summary for page options in the views UI. Overrides Block:: |
|
Block:: |
public | function |
Allows to change the display settings right before executing the block. Overrides Block:: |
|
Block:: |
public | function |
Reacts on deleting a display. Overrides DisplayPluginBase:: |
|
Block:: |
public static | function | Sort field config array by weight. | |
Block:: |
public | function |
Perform any necessary changes to the form values prior to storage.
There is no need for this function to actually store the data. Overrides DisplayPluginBase:: |
|
Block:: |
public | function |
Block views use exposed widgets only if AJAX is set. Overrides Block:: |
|
Block:: |
public | function |
Constructs a new Block instance. Overrides Block:: |
|
DependencySerializationTrait:: |
protected | property | An array of entity type IDs keyed by the property name of their storages. | |
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. | |
DependencyTrait:: |
protected | function | Adds multiple dependencies. | |
DependencyTrait:: |
protected | function | Adds a dependency. | |
DeprecatedServicePropertyTrait:: |
public | function | Allows to access deprecated/removed properties. | |
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 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:: |
public | 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:: |
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:: |
1 |
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:: |
3 |
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:: |
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:: |
protected | function | Get the more URL for this view. | |
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 |
Returns the base path to use for this display. 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 |
Checks to see if the display has a 'path' field. Overrides DisplayPluginInterface:: |
1 |
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:: |
public | 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 static | function |
Lists the trusted callbacks provided by the implementing class. Overrides PluginBase:: |
|
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:: |
6 |
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 |
Validate that the plugin is correct and can be saved. Overrides PluginBase:: |
3 |
DisplayPluginBase:: |
public | function |
Validate the options form. Overrides PluginBase:: |
2 |
DisplayPluginBase:: |
public | function |
Renders the exposed form as block. Overrides DisplayPluginInterface:: |
|
MessengerTrait:: |
protected | property | The messenger. | 29 |
MessengerTrait:: |
public | function | Gets the messenger. | 29 |
MessengerTrait:: |
public | function | Sets the messenger. | |
PluginBase:: |
protected | property | Configuration information passed into the plugin. | 1 |
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. | 1 |
PluginBase:: |
protected | property | The plugin_id. | |
PluginBase:: |
protected | property | Stores the render API renderer. | 3 |
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:: |
3 |
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:: |
public | function | Determines if the plugin is configurable. | |
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 |
PluginDependencyTrait:: |
protected | function | Calculates and returns dependencies of a specific plugin instance. | |
PluginDependencyTrait:: |
protected | function | Wraps the module handler. | 1 |
PluginDependencyTrait:: |
protected | function | Wraps the theme handler. | 1 |
StringTranslationTrait:: |
protected | property | The string translation service. | 1 |
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. | |
TrustedCallbackInterface:: |
constant | Untrusted callbacks throw exceptions. | ||
TrustedCallbackInterface:: |
constant | Untrusted callbacks trigger silenced E_USER_DEPRECATION errors. | ||
TrustedCallbackInterface:: |
constant | Untrusted callbacks trigger E_USER_WARNING errors. |