1 entity_example.module entity_example_basic_add()

Provides a wrapper on the edit form to add a new entity.

Related topics


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


function entity_example_basic_add() {
  // Create a basic entity structure to be used and passed to the validation
  // and submission functions.
  $entity = entity_get_controller('entity_example_basic')->create();
  return backdrop_get_form('entity_example_basic_form', $entity);