You are here

public function EntityView::blockForm in Chaos Tool Suite (ctools) 8.3

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