function oa_wizard_entity_view in Open Atrium Wizard 7.2
Implements hook_entity_view
File
- ./
oa_wizard.module, line 407 - Code for the OpenAtrium Wizard.
Code
function oa_wizard_entity_view($entity, $type, $view_mode, $langcode) {
if ($type == 'oa_wizard') {
if (isset($entity->content['field_wizard_steps'][0]['#markup'])) {
// expand newline to html breaks
$entity->content['field_wizard_steps'][0]['#markup'] = nl2br($entity->content['field_wizard_steps'][0]['#markup']);
}
if (isset($entity->title)) {
// add the title of the wizard
$entity->content['title'] = array(
'#markup' => '<h3>' . check_plain($entity->title) . '</h3>',
'#weight' => -9,
);
}
}
}