function formassembly_view in FormAssembly 7
The fa_form view callback.
Parameters
FormAssemblyEntity $fa_form: An fa_form entity
string $view_mode: The view mode to display
Return value
array Returns the render array for an fa_form entity.
1 call to formassembly_view()
- formassembly_form in ./
formassembly.module - Form definition for editing a fa_form entity.
1 string reference to 'formassembly_view'
- formassembly_menu in ./
formassembly.module - Implements hook_menu().
File
- ./
formassembly.module, line 208 - Contains hooks implementations and callbacks to non-admin pages.
Code
function formassembly_view($fa_form, $view_mode = 'full') {
switch ($view_mode) {
case 'full':
drupal_set_title(entity_label('fa_form', $fa_form));
return entity_view('fa_form', array(
entity_id('fa_form', $fa_form) => $fa_form,
), 'full');
case 'markup':
return entity_view('fa_form', array(
entity_id('fa_form', $fa_form) => $fa_form,
), 'markup');
}
}