You are here

public function AddToCartForm::getFormId in Ubercart 8.4

Returns a unique string identifying the form.

The returned ID should be a unique string that can be a valid PHP function name, since it's used in hook implementation names such as hook_form_FORM_ID_alter().

Return value

string The unique string identifying the form.

Overrides BuyItNowForm::getFormId

File

uc_product/src/Form/AddToCartForm.php, line 36

Class

AddToCartForm
Defines a complex form for adding a product to the cart.

Namespace

Drupal\uc_product\Form

Code

public function getFormId() {

  // Form ID must be unique to the product so that we may have multiple
  // add-to-cart forms on a page (e.g. in a catalog view).
  return 'uc_product_add_to_cart_form_' . $this->nid;
}