array( * 'enabled' => FALSE, * 'cmis_type' => 'document', * 'cmis_root' => '/Company Home/Guest Home/', * 'content_field' => 'body', * 'fields' => array( * 'title'=>'title', * array('drupal'=>'nid', 'cmis'=>'custom_field', 'cmis to drupal' => FALSE, 'drupal to cmis' => TRUE) * ) * ) * ); */ /** * Implementation of hook_menu() for CMIS sync module. */ function cmis_sync_menu() { foreach (node_get_types() as $type) { $type_name = $type->type; $items['admin/settings/cmis/sync/'. $type_name] = array( 'title' => 'Sync '. $type_name, 'page callback' => 'drupal_get_form', 'page arguments' => array('cmis_sync_admin_form', $type_name), 'access arguments' => array('administer cmis'), 'file' => 'cmis_sync.admin.inc', 'type' => MENU_NORMAL_ITEM, 'weight' => 1, ); } return $items; } /** * Implementation of hook_theme() for CMIS sync module. */ function cmis_sync_theme() { return array( 'cmis_sync_admin_field_map_table' => array( 'arguments' => array('form' => NULL), 'file' => 'cmis_sync.theme.inc' ) ); } /** * Implementation of hook_nodeapi() for CMIS sync module. */ function cmis_sync_nodeapi(& $node, $op, $teaser, $page) { if (in_array($op, array('insert', 'update', 'delete'))) { module_load_include('drupal.inc', 'cmis_sync'); _cmis_sync_drupal_cmis_update(array('node' => $node, 'op' => $op)); } } /** * Implementation of hook_cron * * @todo * Synchronize individual node as well. Maybe exporting a hook, * might allow other modules to implement their own sync logic. * Handle SQL injection for CMIS query calls. Low priority. * */ function cmis_sync_cron() { module_load_include('cmis.inc', 'cmis_sync'); _cmis_sync_cmis_drupal_update(); }