function Block::defineOptions

Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/display/Block.php \Drupal\views\Plugin\views\display\Block::defineOptions()
  2. 10 core/modules/views/src/Plugin/views/display/Block.php \Drupal\views\Plugin\views\display\Block::defineOptions()
  3. 11.x core/modules/views/src/Plugin/views/display/Block.php \Drupal\views\Plugin\views\display\Block::defineOptions()

Overrides DisplayPluginBase::defineOptions

File

core/modules/views/src/Plugin/views/display/Block.php, line 99

Class

Block
The plugin that handles a block.

Namespace

Drupal\views\Plugin\views\display

Code

protected function defineOptions() {
    $options = parent::defineOptions();
    $options['block_description'] = [
        'default' => '',
    ];
    $options['block_category'] = [
        'default' => $this->t('Lists (Views)'),
    ];
    $options['block_hide_empty'] = [
        'default' => FALSE,
    ];
    $options['allow'] = [
        'contains' => [
            'items_per_page' => [
                'default' => 'items_per_page',
            ],
        ],
    ];
    return $options;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.