You are here

public function ShippingQuoteMethodController::addForm in Ubercart 8.4

Build the shipping quote method add form.

Parameters

string $plugin_id: The plugin ID for the shipping quote.

Return value

array The shipping quote method edit form.

1 string reference to 'ShippingQuoteMethodController::addForm'
uc_quote.routing.yml in shipping/uc_quote/uc_quote.routing.yml
shipping/uc_quote/uc_quote.routing.yml

File

shipping/uc_quote/src/Controller/ShippingQuoteMethodController.php, line 22

Class

ShippingQuoteMethodController
Route controller for shipping quote methods.

Namespace

Drupal\uc_quote\Controller

Code

public function addForm($plugin_id) {

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