You are here

protected function Block::defineOptions in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 83
Contains \Drupal\views\Plugin\views\display\Block.

Class

Block
The plugin that handles a block.

Namespace

Drupal\views\Plugin\views\display

Code

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