You are here

public function BuyItNowForm::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 FormInterface::getFormId

1 call to BuyItNowForm::getFormId()
BuyItNowForm::buildForm in uc_product/src/Form/BuyItNowForm.php
Form constructor.
1 method overrides BuyItNowForm::getFormId()
AddToCartForm::getFormId in uc_product/src/Form/AddToCartForm.php
Returns a unique string identifying the form.

File

uc_product/src/Form/BuyItNowForm.php, line 46

Class

BuyItNowForm
Defines a simple 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
  // buy-it-now forms on a page (e.g. in a catalog view).
  return 'uc_product_buy_it_now_form_' . $this->nid;
}