/** * {@inheritdoc} */ public function buildConfigurationForm(array $form, array &$form_state) { $form = parent::buildConfigurationForm($form, $form_state); $form['autocreate'] = array('#type' => 'checkbox', '#title' => $this->t('Autocreate term'), '#default_value' => $this->configuration['autocreate']); return $form; }
/** * {@inheritdoc} * * @todo Inject $user. */ public function buildConfigurationForm(array $form, FormStateInterface $form_state) { $form = parent::buildConfigurationForm($form, $form_state); $options = [FILE_EXISTS_REPLACE => $this->t('Replace'), FILE_EXISTS_RENAME => $this->t('Rename'), FILE_EXISTS_ERROR => $this->t('Ignore')]; $form['existing'] = ['#type' => 'select', '#title' => $this->t('Handle existing files'), '#options' => $options, '#default_value' => $this->configuration['existing']]; return $form; }