NODETYPE_REFERENCE, 'cdm_' . NODETYPE_TAXON => NODETYPE_TAXON, 'cdm_' . NODETYPE_MEDIA => NODETYPE_MEDIA, 'cdm_' . NODETYPE_NAME => NODETYPE_NAME, ); } return $nodetypes; } /** * Implements hook_node_info(). */ function cdm_dataportal_node_info() { $nodeinfo = array(); foreach (cdm_get_nodetypes() as $nodeType => $type) { $nodeinfo[$nodeType] = array( 'name' => t('@type-name', array('@type-name' => ucfirst($type))), 'has_title' => TRUE, 'base' => 'cdm_dataportal', 'description' => t( 'This node type is being used internally to create peer nodes in drupal for cdm entities of the type !type.', array('!type' => $type)), ); } return $nodeinfo; } /** * Implements hook_form(). */ function cdm_dataportal_form(&$node) { $type = node_type_get_type($node); if (is_numeric($node->nid)) { $cdm_node_notice = t( 'In order to edit CDM content, please use the !taxEditor', array( '!taxEditor' => l(t('Taxonomic Editor'), 'http://dev.e-taxonomy.eu/trac/wiki/TaxonomicEditor', array('fragment' => TRUE)) ) ); } else { $cdm_node_notice = t('You cannot manually create a node of type @type-name. This node type is only created internally' , array('@type-name' => $type->name)); } $form['cdm'] = array( '#value' => '