You are here

public function UnitsUnitUIController::entityFormSubmitBuildEntity in Units of Measurement 7

Same name and namespace in other branches
  1. 7.2 includes/UnitsUnitUIController.class.inc \UnitsUnitUIController::entityFormSubmitBuildEntity()

Entity submit builder invoked via entity_ui_form_submit_build_entity().

Extracts the form values and updates the entity.

The provided implementation makes use of the helper function entity_form_submit_build_entity() provided by core, which already invokes the field API attacher for fieldable entities.

Return value

object The updated entity.

Overrides EntityDefaultUIController::entityFormSubmitBuildEntity

See also

entity_ui_form_submit_build_entity()

File

includes/UnitsUnitUIController.class.inc, line 64
Definition of UnitsUnitUIController class.

Class

UnitsUnitUIController
Admin UI controller class for entity type 'units_unit'.

Code

public function entityFormSubmitBuildEntity($form, &$form_state) {

  // Before we handle on down the way to parent's method, we have to insert
  // the info about bundle into $form_state.
  $form_state['values'][$this->entityInfo['entity keys']['bundle']] = $this
    ->bundleArgument();
  return parent::entityFormSubmitBuildEntity($form, $form_state);
}