You are here

ProductClassOptionsForm.php in Ubercart 8.4

File

uc_attribute/src/Form/ProductClassOptionsForm.php
View source
<?php

namespace Drupal\uc_attribute\Form;

use Drupal\Core\Form\FormStateInterface;
use Drupal\node\NodeTypeInterface;

/**
 * Defines the product class options overview form.
 */
class ProductClassOptionsForm extends ObjectOptionsFormBase {

  /**
   * {@inheritdoc}
   */
  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);
  }

}

Classes

Namesort descending Description
ProductClassOptionsForm Defines the product class options overview form.