function object_log_build_object in Object Log 7
Build a render array for a stored object.
Parameters
$label: The label of the object to display.
Return value
A render array for the object.
1 call to object_log_build_object()
- object_log_build_objects in ./
object_log.admin.inc - Display stored objects for inspection.
File
- ./
object_log.admin.inc, line 144
Code
function object_log_build_object($label) {
$log = object_log_retrieve($label);
if (!$log) {
return FALSE;
}
$object = $log->data;
$build = array(
'#type' => 'container',
'#attributes' => array(
'class' => array(
'object_wrapper',
),
),
);
$build['title'] = array(
'#type' => 'markup',
'#markup' => check_plain($label),
'#prefix' => '<h4 class="object-label">',
'#suffix' => '</h4>',
);
$build['object'] = array(
'#type' => 'markup',
'#markup' => kprint_r($object, TRUE, NULL),
'#prefix' => '<div class="object">',
'#suffix' => '</div>',
);
return $build;
}