public function FulfillmentMethodController::addForm in Ubercart 8.4
Build the fulfillment method add form.
Parameters
string $plugin_id: The plugin ID for the fulfillment method.
Return value
array The fulfillment method instance edit form.
1 string reference to 'FulfillmentMethodController::addForm'
- uc_fulfillment.routing.yml in shipping/
uc_fulfillment/ uc_fulfillment.routing.yml - shipping/uc_fulfillment/uc_fulfillment.routing.yml
File
- shipping/
uc_fulfillment/ src/ Controller/ FulfillmentMethodController.php, line 22
Class
- FulfillmentMethodController
- Route controller for fulfillment methods.
Namespace
Drupal\uc_fulfillment\ControllerCode
public function addForm($plugin_id) {
// Create a fulfillment method configuration entity.
$entity = $this
->entityTypeManager()
->getStorage('uc_fulfillment_method')
->create([
'plugin' => $plugin_id,
]);
return $this
->entityFormBuilder()
->getForm($entity);
}