public function ProductOptionsForm::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/ ProductOptionsForm.php, line 17
Class
- ProductOptionsForm
- Defines the product options overview form.
Namespace
Drupal\uc_attribute\FormCode
public function buildForm(array $form, FormStateInterface $form_state, NodeInterface $node = NULL) {
$this->attributeTable = 'uc_product_attributes';
$this->optionTable = 'uc_product_options';
$this->idField = 'nid';
$this->idValue = $node
->id();
$this->attributes = uc_product_get_attributes($this->idValue);
return parent::buildBaseForm($form, $form_state);
}