function EntityView::blockForm
Same name in other branches
- 8.x-3.x src/Plugin/Block/EntityView.php \Drupal\ctools\Plugin\Block\EntityView::blockForm()
Overrides BlockPluginTrait::blockForm
File
-
src/
Plugin/ Block/ EntityView.php, line 85
Class
- EntityView
- Provides a block to view a specific entity.
Namespace
Drupal\ctools\Plugin\BlockCode
public function blockForm($form, FormStateInterface $form_state) {
$form['view_mode'] = [
'#type' => 'select',
'#options' => $this->entityDisplayRepository
->getViewModeOptions($this->getDerivativeId()),
'#title' => $this->t('View mode'),
'#default_value' => $this->configuration['view_mode'],
];
return $form;
}