function field_test_entity_form_submit_builder in SimpleTest 7
Build a test_entity by processing submitted form values and prepare for a form rebuild.
1 call to field_test_entity_form_submit_builder()
- field_test_entity_form_submit in tests/
field_test.module - Submit handler for field_test_set_field_values().
1 string reference to 'field_test_entity_form_submit_builder'
- field_test_entity_form in tests/
field_test.module - Form to set the value of fields attached to our entity.
File
- tests/
field_test.module, line 338
Code
function field_test_entity_form_submit_builder($form, &$form_state) {
$entity = field_test_create_stub_entity($form_state['values']['ftid'], $form_state['values']['ftvid'], $form_state['values']['fttype']);
field_attach_submit('test_entity', $entity, $form, $form_state);
$form_state['test_entity'] = (array) $entity;
$form_state['rebuild'] = TRUE;
return $entity;
}