public function RenderedEntity::buildOptionsForm in Entity API 8.0
Default options form that provides the label widget that all fields should have.
Overrides FieldPluginBase::buildOptionsForm
File
- src/
Plugin/ views/ field/ RenderedEntity.php, line 98 - Contains \Drupal\entity\Plugin\views\field\RenderedEntity.
Class
- RenderedEntity
- Provides a field handler which renders an entity in a certain view mode.
Namespace
Drupal\entity\Plugin\views\fieldCode
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
parent::buildOptionsForm($form, $form_state);
$form['view_mode'] = [
'#type' => 'select',
'#options' => $this->entityManager
->getViewModeOptions($this
->getEntityTypeId()),
'#title' => $this
->t('View mode'),
'#default_value' => $this->options['view_mode'],
];
}