public function AssignmentSiteForm::buildForm in Features 8.4
Same name and namespace in other branches
- 8.3 modules/features_ui/src/Form/AssignmentSiteForm.php \Drupal\features_ui\Form\AssignmentSiteForm::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/ AssignmentSiteForm.php, line 24
Class
- AssignmentSiteForm
- Configures the selected configuration assignment method for this site.
Namespace
Drupal\features_ui\FormCode
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('site'));
$this
->setActions($form, self::METHOD_ID);
return $form;
}