You are here

public function UserProfile::configurationForm in Flexiform 8

Prepare a configuration form.

Overrides FlexiformFormEntityBase::configurationForm

File

src/Plugin/FlexiformFormEntity/UserProfile.php, line 115

Class

UserProfile
Form Entity for getting profiles from a user object.

Namespace

Drupal\flexiform\Plugin\FlexiformFormEntity

Code

public function configurationForm(array $form, FormStateInterface $form_state) {
  $form = parent::configurationForm($form, $form_state);
  $form['create'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Create New Profile'),
    '#description' => $this
      ->t('If the property is empty, and new profile will be created.'),
    '#default_value' => !empty($this->configuration['create']),
  ];
  return $form;
}