You are here

protected function EntityReferenceRevisions::defineOptions in Entity Reference Revisions 8

Same name in this branch
  1. 8 src/Plugin/views/display/EntityReferenceRevisions.php \Drupal\entity_reference_revisions\Plugin\views\display\EntityReferenceRevisions::defineOptions()
  2. 8 src/Plugin/views/style/EntityReferenceRevisions.php \Drupal\entity_reference_revisions\Plugin\views\style\EntityReferenceRevisions::defineOptions()
  3. 8 src/Plugin/views/row/EntityReferenceRevisions.php \Drupal\entity_reference_revisions\Plugin\views\row\EntityReferenceRevisions::defineOptions()

Overrides \Drupal\views\Plugin\views\display\DisplayPluginBase::defineOptions().

Overrides DisplayPluginBase::defineOptions

File

src/Plugin/views/display/EntityReferenceRevisions.php, line 48

Class

EntityReferenceRevisions
The plugin that handles an EntityReferenceRevisions display.

Namespace

Drupal\entity_reference_revisions\Plugin\views\display

Code

protected function defineOptions() {
  $options = parent::defineOptions();

  // Force the style plugin to 'entity_reference_style' and the row plugin to
  // 'fields'.
  $options['style']['contains']['type'] = array(
    'default' => 'entity_reference_revisions',
  );
  $options['defaults']['default']['style'] = FALSE;
  $options['row']['contains']['type'] = array(
    'default' => 'entity_reference_revisions',
  );
  $options['defaults']['default']['row'] = FALSE;

  // Make sure the query is not cached.
  $options['defaults']['default']['cache'] = FALSE;

  // Set the display title to an empty string (not used in this display type).
  $options['title']['default'] = '';
  $options['defaults']['default']['title'] = FALSE;
  return $options;
}