function party_default_attached_entity_form_submit in Party 8.2
Same name and namespace in other branches
- 7 party.module \party_default_attached_entity_form_submit()
The default attached entity form submit callback.
Parameters
$form: The whole form so far
$form_state: The form state
$attached_entity: The attached entity this form is for
$party: The party the $attached entity is attached to
File
- ./
party.module, line 1473 - Provides a generic CRM party entity.
Code
function party_default_attached_entity_form_submit($element, &$form_state, $data_set, $delta, $party) {
// Submit fields.
$data_set_info = party_get_data_set_info($data_set
->getDataInfo('name'));
field_attach_submit($data_set
->getDataInfo('entity type'), $data_set
->getEntity($delta), $element, $form_state);
entity_save($data_set
->getDataInfo('entity type'), $data_set
->getEntity($delta));
}