You are here

public function TaxRateEditForm::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 TaxRateFormBase::buildForm

File

uc_tax/src/Form/TaxRateEditForm.php, line 15

Class

TaxRateEditForm
Defines the tax rate edit form.

Namespace

Drupal\uc_tax\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $rate = $this->entity;

  // Set title to show what rate we're editing.
  $form['#title'] = $this
    ->t('Edit %rate', [
    '%rate' => $rate
      ->label(),
  ]);
  return parent::buildForm($form, $form_state);
}