You are here

function entity_example_basic_save in Examples for Developers 7

We save the entity by calling the controller.

Related topics

1 call to entity_example_basic_save()
entity_example_basic_form_submit in entity_example/entity_example.module
Form submit handler: Submits basic_add_form information.

File

entity_example/entity_example.module, line 484
Implements the basic functionality required to create and display an entity.

Code

function entity_example_basic_save(&$entity) {
  return entity_get_controller('entity_example_basic')
    ->save($entity);
}