You are here

public function TaxRateController::addForm in Ubercart 8.4

Build the tax rate add form.

Parameters

string $plugin_id: The plugin ID for the tax rate.

Return value

array The tax rate edit form.

1 string reference to 'TaxRateController::addForm'
uc_tax.routing.yml in uc_tax/uc_tax.routing.yml
uc_tax/uc_tax.routing.yml

File

uc_tax/src/Controller/TaxRateController.php, line 22

Class

TaxRateController
Route controller for tax rates.

Namespace

Drupal\uc_tax\Controller

Code

public function addForm($plugin_id) {

  // Create a tax rate configuration entity.
  $entity = $this
    ->entityTypeManager()
    ->getStorage('uc_tax_rate')
    ->create([
    'plugin' => $plugin_id,
  ]);
  return $this
    ->entityFormBuilder()
    ->getForm($entity);
}