/** * Function to retieve the instance from module model * @param <Vtiger_Module_Model> $moduleModel - module instance * @return Vtiger_RecordStructure_Model */ public static function getInstanceForModule($moduleModel, $mode = self::RECORD_STRUCTURE_MODE_DEFAULT) { $className = Vtiger_Loader::getComponentClassName('Model', $mode . 'RecordStructure', $moduleModel->get('name')); $instance = new $className(); $instance->setModule($moduleModel); return $instance; }
/** * Function to retieve the instance from module model * @param <Vtiger_Module_Model> $moduleModel - module instance * @return Vtiger_RecordStructure_Model */ public static function getInstanceForModule($moduleModel, $mode = self::RECORD_STRUCTURE_MODE_DEFAULT) { global $log; $log->debug("Entering ./models/RecordStructure.php::staticgetInstanceForModule"); $className = Vtiger_Loader::getComponentClassName('Model', $mode . 'RecordStructure', $moduleModel->get('name')); $instance = new $className(); $instance->setModule($moduleModel); return $instance; }