You are here

function theme_cmis_browser_content_properties in CMIS API 6.2

Same name and namespace in other branches
  1. 6.4 cmis_browser/cmis_browser.theme.inc \theme_cmis_browser_content_properties()
  2. 6.3 cmis_browser/cmis_browser.theme.inc \theme_cmis_browser_content_properties()
  3. 7.2 cmis_browser/cmis_browser.theme.inc \theme_cmis_browser_content_properties()
  4. 7 cmis_browser/cmis_browser.theme.inc \theme_cmis_browser_content_properties()

Theme for cmis_browser_content_properties action.

Parameters

$cmis_object:

1 theme call to theme_cmis_browser_content_properties()
cmis_browser_content_properties in cmis_browser/cmis_browser.content_properties.inc
CMIS object properties page.

File

cmis_browser/cmis_browser.theme.inc, line 173

Code

function theme_cmis_browser_content_properties($cmis_object) {
  $output = theme('box', $cmis_object->title, $cmis_object->summary);
  $header = array(
    t('Property'),
    t('Value'),
  );
  $rows = array();
  $rows[] = array(
    '<b>' . t('Author') . '</b>',
    $cmis_object->author,
  );
  $rows[] = array(
    '<b>' . t('Type') . '</b>',
    $cmis_object->author,
  );
  foreach ($cmis_object->properties as $property => $value) {
    if ($value instanceof DateTime) {
      $rows[] = array(
        '<b>' . $property . '</b>',
        date_format($value, 'n/j/Y g:i A'),
      );
    }
    else {
      $rows[] = array(
        '<b>' . $property . '</b>',
        $value,
      );
    }
  }
  return $output . theme('table', NULL, $rows);
}