You are here

public function OptionAddForm::buildForm in Ubercart 8.4

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 OptionFormBase::buildForm

File

uc_attribute/src/Form/OptionAddForm.php, line 16

Class

OptionAddForm
Defines the attribute option add form.

Namespace

Drupal\uc_attribute\Form

Code

public function buildForm(array $form, FormStateInterface $form_state, $aid = NULL) {
  $attribute = uc_attribute_load($aid);
  $form = parent::buildForm($form, $form_state, $aid);
  $form['#title'] = $this
    ->t('Options for %name', [
    '%name' => $attribute->name,
  ]);
  return $form;
}