You are here

protected function Block::defineOptions in Drupal 8

Same name and namespace 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()

Information about options for all kinds of purposes will be held here.


'option_name' => array(
 - 'default' => default value,
 - 'contains' => (optional) array of items this contains, with its own
     defaults, etc. If contains is set, the default will be ignored and
     assumed to be array().
 ),

Return value

array Returns the options of this handler/plugin.

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;
}