Created
November 27, 2013 18:52
-
-
Save heyMP/7681100 to your computer and use it in GitHub Desktop.
Using Entity Wrapper to easily save yo entities.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function _update_multi_registration($flag, $entity_id, $status) { | |
$entity_type = $flag->entity_type; | |
$entity = entity_load_single($entity_type, $entity_id); | |
$nodewrapper = entity_metadata_wrapper($entity_type, $entity); | |
$nodewrapper->field_event_mult_reg = $status; | |
$nodewrapper->save(true); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment