function template_preprocess_cmis_content_properties in CMIS API 8.2
Same name and namespace in other branches
- 8 cmis.module \template_preprocess_cmis_content_properties()
- 3.0.x cmis.module \template_preprocess_cmis_content_properties()
Implements hook_preprocess_cmis_content_properties().
File
- ./
cmis.module, line 127
Code
function template_preprocess_cmis_content_properties(&$variables) {
$object = $variables['object'];
$rows = [];
foreach ($object
->getProperties() as $key => $property) {
if ($property) {
$rows[] = [
$key,
_cmis_get_property($property),
];
}
}
$variables['properties'] = '';
if (!empty($rows)) {
$table = [
'#theme' => 'table',
'#header' => [
t('Property'),
t('Value'),
],
'#rows' => $rows,
];
$variables['properties'] = render($table);
}
}