getBlockType($blockType); $outputs = \Workflow\VtUtils::json_decode($type["output"]); $outputPoints = array(); foreach($outputs as $output) { $output[1] = getTranslatedString($output[1], "Workflow2"); $outputPoints[] = $output; } return $outputPoints; } public function getPersonPoints($blockType) { $type = $this->getBlockType($blockType); $personInputPoints = array(); if(strlen($type["persons"]) > 4) { $persons = \Workflow\VtUtils::json_decode($type["persons"]); foreach($persons as $tmpPersons) { $tmpPersons[1] = getTranslatedString($tmpPersons[1], "Workflow2"); $personInputPoints[] = $tmpPersons; } } return $personInputPoints; } public function getBlockHtml($blockID, $blockType, $top, $left) { $type = $this->getBlockType($blockType); return '
'.getTranslatedString($type["text"], $type["module"]).''.(!empty($text)?'
'.$text.'':'').'
'.($block!="start"?'':'').'
 
'; } public function getBlockType($type) { if(isset(self::$Cache[$type])) { return self::$Cache[$type]; } $adb = \PearDatabase::getInstance(); $sql = 'SELECT * FROM vtiger_wf_types WHERE type = ?'; $result = $adb->pquery($sql, array($type)); if($adb->num_rows($result) == 0) return false; self::$Cache[$type] = $adb->raw_query_result_rowdata($result); return self::$Cache[$type]; } }