function uc_product_is_product_form in Ubercart 8.4
Same name and namespace in other branches
- 6.2 uc_product/uc_product.module \uc_product_is_product_form()
- 7.3 uc_product/uc_product.module \uc_product_is_product_form()
Determines whether or not a given form array is a product node form.
Parameters
\Drupal\Core\Form\FormStateInterface $form_state: The form state object to examine.
Return value
bool TRUE or FALSE indicating whether or not the form is a product node form.
File
- uc_product/
uc_product.module, line 743 - The product module for Ubercart.
Code
function uc_product_is_product_form(FormStateInterface $form_state) {
$bundle = $form_state
->getFormObject()
->getEntity()
->bundle();
return uc_product_is_product($bundle);
}