Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function form(array $form, FormStateInterface $form_state)
 {
     $replacement_styles = $this->getReplacementOptions();
     // If there are non-empty options in the list, allow the user to optionally
     // pick up a replacement.
     if (count($replacement_styles) > 1) {
         $form['replacement'] = ['#type' => 'select', '#title' => $this->t('Replacement style'), '#options' => $replacement_styles, '#empty_option' => $this->t('- No replacement -'), '#weight' => -5];
     }
     return parent::form($form, $form_state);
 }
 /**
  * {@inheritdoc}
  */
 public function form(array $form, FormStateInterface $form_state) {
   return parent::form($form, $form_state);
 }
Exemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 public function form(array $form, FormStateInterface $form_state)
 {
     $replacement_styles = array_diff_key(image_style_options(), array($this->entity->id() => ''));
     $form['replacement'] = array('#title' => $this->t('Replacement style'), '#type' => 'select', '#options' => $replacement_styles, '#empty_option' => $this->t('No replacement, just delete'));
     return parent::form($form, $form_state);
 }