You are here

protected function WizardPluginBase::block_display_options in Views (for Drupal 7) 8.3

Retrieves the block display options.

Parameters

array $form: The full wizard form array.

array $form_state: The current state of the wizard form.

Return value

array Returns an array of display options.

3 calls to WizardPluginBase::block_display_options()
Comment::block_display_options in lib/Views/comment/Plugin/views/wizard/Comment.php
Overrides Drupal\views\Plugin\views\wizard\WizardPluginBase::page_display_options().
Node::block_display_options in lib/Views/node/Plugin/views/wizard/Node.php
Overrides Drupal\views\Plugin\views\wizard\WizardPluginBase::page_display_options().
WizardPluginBase::build_display_options in lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php
Builds an array of display options for the view.
2 methods override WizardPluginBase::block_display_options()
Comment::block_display_options in lib/Views/comment/Plugin/views/wizard/Comment.php
Overrides Drupal\views\Plugin\views\wizard\WizardPluginBase::page_display_options().
Node::block_display_options in lib/Views/node/Plugin/views/wizard/Node.php
Overrides Drupal\views\Plugin\views\wizard\WizardPluginBase::page_display_options().

File

lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php, line 918
Definition of Drupal\views\Plugin\views\wizard\WizardPluginBase.

Class

WizardPluginBase
Provides the interface and base class for Views Wizard plugins.

Namespace

Drupal\views\Plugin\views\wizard

Code

protected function block_display_options(array $form, array &$form_state) {
  $display_options = array();
  $block = $form_state['values']['block'];
  $display_options['title'] = $block['title'];
  $display_options['style'] = array(
    'type' => $block['style']['style_plugin'],
  );
  $display_options['row'] = array(
    'type' => isset($block['style']['row_plugin']) ? $block['style']['row_plugin'] : 'fields',
  );
  $display_options['pager']['type'] = $block['pager'] ? 'full' : (empty($block['items_per_page']) ? 'none' : 'some');
  $display_options['pager']['options']['items_per_page'] = $block['items_per_page'];
  return $display_options;
}