function field_test_entity_add

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

1 string reference to 'field_test_entity_add'
field_test_menu in drupal/core/modules/field/tests/modules/field_test/field_test.module
Implements hook_menu().

File

drupal/core/modules/field/tests/modules/field_test/field_test.entity.inc, line 175
Defines an entity type.

Code

function field_test_entity_add($fttype) {
  $fttype = str_replace('-', '_', $fttype);
  $entity = field_test_create_entity(NULL, NULL, $fttype);
  drupal_set_title(t('Create test_entity @bundle', array(
    '@bundle' => $fttype,
  )), PASS_THROUGH);
  return entity_get_form($entity);
}