/** * Get instance by id or name * @param mixed id or name of the module */ static function getInstance($value) { $instance = false; $data = Vtiger_Functions::getModuleData($value); if ($data) { $instance = new self(); $instance->initialize($data); } return $instance; }