public function Entity::buildOptionsForm

Default options form that provides the label widget that all fields should have.

Overrides TokenizeAreaPluginBase::buildOptionsForm

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/area/Entity.php, line 57
Contains \Drupal\views\Plugin\views\area\Entity.

Class

Entity
Provides an area handler which renders an entity in a certain view mode.

Namespace

Drupal\views\Plugin\views\area

Code

public function buildOptionsForm(&$form, &$form_state) {
  parent::buildOptionsForm($form, $form_state);
  $options = $this
    ->buildViewModeOptions();
  $form['view_mode'] = array(
    '#type' => 'select',
    '#options' => $options,
    '#title' => t('View mode'),
    '#default_value' => $this->options['view_mode'],
  );
  $form['entity_id'] = array(
    '#title' => t('ID'),
    '#type' => 'textfield',
    '#default_value' => $this->options['entity_id'],
  );
}