1 field_test.entity.inc | field_test_entity_add($fttype) |
Menu callback: displays the 'Add new test_entity' form.
File
- core/
modules/ field/ tests/ field_test/ field_test.entity.inc, line 326 - Defines an entity type.
Code
function field_test_entity_add($fttype) {
$fttype = str_replace('-', '_', $fttype);
$entity = entity_create('test_entity', array('fttype' => $fttype));
backdrop_set_title(t('Create test_entity @bundle', array('@bundle' => $fttype)), PASS_THROUGH);
return backdrop_get_form('field_test_entity_form', $entity, TRUE);
}