View::mergeDefaultDisplaysOptions

public View::mergeDefaultDisplaysOptions()

Add defaults to the display options.

Overrides ViewEntityInterface::mergeDefaultDisplaysOptions

File

core/modules/views/src/Entity/View.php, line 426

Class

View
Defines a View configuration entity class.

Namespace

Drupal\views\Entity

Code

public function mergeDefaultDisplaysOptions() {
  $displays = array();
  foreach ($this->get('display') as $key => $options) {
    $options += array(
      'display_options' => array(),
      'display_plugin' => NULL,
      'id' => NULL,
      'display_title' => '',
      'position' => NULL,
    );
    // Add the defaults for the display.
    $displays[$key] = $options;
  }
  $this->set('display', $displays);
}
doc_Drupal
2016-10-29 09:53:41
Comments
Leave a Comment

Please login to continue.