function services_client_is_entity_form in Services Client 7.2
Detect if form is entity form.
Return value
bool TRUE if form is for entity.
1 call to services_client_is_entity_form()
- services_client_form_alter in ./
services_client.module - Implements hook_form_alter().
File
- ./
services_client.module, line 204
Code
function services_client_is_entity_form($form, $form_state) {
// Field attach API is adding these properties to each form with fields.
if (!empty($form['#entity_type']) && !empty($form['#bundle'])) {
return TRUE;
}
// Custom entities built via entity api module
if (!empty($form_state['wrapper_callback']) && $form_state['wrapper_callback'] == 'entity_ui_main_form_defaults' && !empty($form_state['entity_type'])) {
return TRUE;
}
return FALSE;
}