public function MerciLineItemInlineEntityFormController::save in MERCI (Manage Equipment Reservations, Checkout and Inventory) 7.3
Permanently saves the given entity.
Parameters
$entity: The entity to save.
array $context: Available keys:
- parent_entity_type: The type of the parent entity.
- parent_entity: The parent entity.
Overrides EntityInlineEntityFormController::save
File
- merci_line_item_ief/
includes/ merci_line_item.inline_entity_form.inc, line 237 - Defines the inline entity form controller for Commerce Line Items.
Class
- MerciLineItemInlineEntityFormController
- @file Defines the inline entity form controller for Commerce Line Items.
Code
public function save($entity, $context) {
$wrapper = entity_metadata_wrapper($context['parent_entity_type'], $context['parent_entity']);
$entity->entity_id = $wrapper
->getIdentifier();
parent::save($entity, $context);
}