You are here

public function AssignmentOptionalForm::buildForm in Features 8.4

Same name and namespace in other branches
  1. 8.3 modules/features_ui/src/Form/AssignmentOptionalForm.php \Drupal\features_ui\Form\AssignmentOptionalForm::buildForm()

Form constructor.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Return value

array The form structure.

Overrides FormInterface::buildForm

File

modules/features_ui/src/Form/AssignmentOptionalForm.php, line 24

Class

AssignmentOptionalForm
Configures the selected configuration assignment method for this site.

Namespace

Drupal\features_ui\Form

Code

public function buildForm(array $form, FormStateInterface $form_state, $bundle_name = NULL) {
  $this->currentBundle = $this->assigner
    ->loadBundle($bundle_name);
  $settings = $this->currentBundle
    ->getAssignmentSettings(self::METHOD_ID);
  $this
    ->setConfigTypeSelect($form, $settings['types']['config'], $this
    ->t('optional'));
  $this
    ->setActions($form, self::METHOD_ID);
  return $form;
}