You are here

public function HierarchyEmbed::optionsSummary in Entity Reference Hierarchy 8

Provide the summary for page options in the views UI.

This output is returned as an array.

Overrides DisplayPluginBase::optionsSummary

File

entity_hierarchy_views/src/Plugin/views/display/HierarchyEmbed.php, line 42
Contains \Drupal\entity_hierarchy_views\Plugin\views\display\HierarchyEmbed.

Class

HierarchyEmbed
The plugin that handles an HierarchyEmbed display.

Namespace

Drupal\entity_hierarchy_views\Plugin\views\display

Code

public function optionsSummary(&$categories, &$options) {
  parent::optionsSummary($categories, $options);
  $categories['entity_hierarchy_embed'] = array(
    'title' => t('Embed settings'),
    'column' => 'second',
    'build' => array(
      '#weight' => -10,
    ),
  );
  $name = strip_tags($this
    ->getOption('entity_hierarchy_embed_admin_name'));
  if (empty($name)) {
    $name = t('None');
  }
  $options['entity_hierarchy_embed_admin_name'] = array(
    'category' => 'entity_hierarchy_embed',
    'title' => t('Admin name'),
    'value' => views_ui_truncate($name, 24),
  );
}