> Structure menu. // We just want one menu item. So to support one menu item that // can handle all of the Tripal entity types, we have to set the // 'bundle of' property here rather than in the hook_entity_info() function. $bundle_of = $entityType; $bundle_of = preg_replace('/_bundle/', '', $bundle_of); $info = entity_get_info($bundle_of); $this->bundleKey = $info['bundle keys']['bundle']; $this->entityInfo['bundle of'] = $bundle_of; } /** * Create a type - we first set up the values that are specific * to our type schema but then also go through the EntityAPIController * function. * * @param $type * The machine-readable type of the tripal data entity. * * @return * A type object with all default fields initialized. */ public function create(array $values = array()) { // Add values that are specific to our entity $values += array( 'id' => '', 'is_new' => TRUE, 'data' => '', ); return parent::create($values); } }