function entity_test_add

Menu callback: displays the 'Add new entity_test' form.

Parameters

string $entity_type: Name of the entity type for which a create form should be displayed.

Return value

array The processed form for a new entity_test.

See also

entity_test_menu()

1 string reference to 'entity_test_add'
entity_test_menu in drupal/core/modules/system/tests/modules/entity_test/entity_test.module
Implements hook_menu().

File

drupal/core/modules/system/tests/modules/entity_test/entity_test.module, line 255
Test module for the entity API providing several entity types for testing.

Code

function entity_test_add($entity_type) {
  drupal_set_title(t('Create an @type', array(
    '@type' => $entity_type,
  )));
  $entity = entity_create($entity_type, array());
  return entity_get_form($entity);
}