function _cmis_get_property in CMIS API 3.0.x
Same name and namespace in other branches
- 8.2 cmis.module \_cmis_get_property()
- 8 cmis.module \_cmis_get_property()
Helper function.
Parameters
\Dkd\PhpCmis\Data\PropertyInterface $property: The property to get values from.
Return value
string The property key's value.
1 call to _cmis_get_property()
- template_preprocess_cmis_content_properties in ./
cmis.module - Implements hook_preprocess_cmis_content_properties().
File
- ./
cmis.module, line 170
Code
function _cmis_get_property(PropertyInterface $property) {
$values = $property
->getValues();
$type = $property
->getType();
if (!empty($values)) {
foreach ($values as &$value) {
if (!empty($value) && $type
->equals(PropertyType::DATETIME)) {
$value = $value
->format(\DateTime::ATOM);
}
}
return implode(', ', $values);
}
return '';
}