public function CommerceProductInlineEntityFormController::entityFormSubmit in Inline Entity Form 7
Overrides EntityInlineEntityFormController::entityFormSubmit().
Overrides EntityInlineEntityFormController::entityFormSubmit
File
- includes/
commerce_product.inline_entity_form.inc, line 287 - Defines the inline entity form controller for Commerce Products.
Class
- CommerceProductInlineEntityFormController
- @file Defines the inline entity form controller for Commerce Products.
Code
public function entityFormSubmit(&$entity_form, &$form_state) {
parent::entityFormSubmit($entity_form, $form_state);
$product = $entity_form['#entity'];
// Show a temporary message to the user for each auto-generated value.
if (empty($product->sku) && module_exists('commerce_autosku') && ($settings = commerce_autosku_get_settings($product))) {
$product->sku = t('Will be auto-generated when the form is saved.');
$product->_remove_sku = TRUE;
}
if (empty($product->title) && $this->settings['autogenerate_title']) {
$product->title = t('Will be auto-generated when the form is saved.');
}
}