function EntityView::blockForm

Overrides BlockPluginTrait::blockForm

File

src/Plugin/Block/EntityView.php, line 90

Class

EntityView
Provides a block to view a specific entity.

Namespace

Drupal\ctools\Plugin\Block

Code

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;
}