function Block::optionsSummary
Same name in other branches
- 4.0.x modules/ctools_views/src/Plugin/Display/Block.php \Drupal\ctools_views\Plugin\Display\Block::optionsSummary()
Overrides Block::optionsSummary
File
-
modules/
ctools_views/ src/ Plugin/ Display/ Block.php, line 62
Class
- Block
- Provides a Block display plugin.
Namespace
Drupal\ctools_views\Plugin\DisplayCode
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'),
'configure_filters' => $this->t('Configure filters'),
'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),
];
}