You are here

cmis_dev.module in CMIS API 6.3

File

cmis_dev/cmis_dev.module
View source
<?php

/**
 * Implementation of hook_menu()
 */
function cmis_dev_menu() {
  $items['cmis/info'] = array(
    'type' => MENU_NORMAL_ITEM,
    'title' => t('CMIS Information'),
    'page callback' => 'cmis_dev_info',
    'access arguments' => array(
      'administer site configuration',
    ),
  );
  return $items;
}

/**
 * Return CMIS Repository Information such as repo name, repo description, 
 * vendor name, product name and product version.
 */
function cmis_dev_info() {
  module_load_include('api.inc', 'cmis');
  try {
    $repository = cmis_get_repository();
  } catch (CMISException $e) {
    cmis_error_handler('cmis_dev', $e);
    return '';
  }
  $rows = array();
  foreach ($repository->info->repositoryInfo as $property_name => $property) {
    $rows[] = array(
      t($property_name),
      $property,
    );
  }
  return theme('table', array(
    t('Name'),
    t('Properties'),
  ), $rows);
}

Functions

Namesort descending Description
cmis_dev_info Return CMIS Repository Information such as repo name, repo description, vendor name, product name and product version.
cmis_dev_menu Implementation of hook_menu()