You are here

public function ProductClassOptionsForm::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 FormInterface::buildForm

File

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

Class

ProductClassOptionsForm
Defines the product class options overview form.

Namespace

Drupal\uc_attribute\Form

Code

public function buildForm(array $form, FormStateInterface $form_state, NodeTypeInterface $node_type = NULL) {
  $this->attributeTable = 'uc_class_attributes';
  $this->optionTable = 'uc_class_attribute_options';
  $this->idField = 'pcid';
  $this->idValue = $node_type
    ->id();
  $this->attributes = uc_class_get_attributes($this->idValue);
  return parent::buildBaseForm($form, $form_state);
}