/** * Get Steps evaluate * * @access public * @param string $app_uid, Uid for case * @param int $del_index , Index for case * @return array * * @copyright Colosa - Bolivia */ public function getSteps($app_uid, $del_index) { Validator::isString($app_uid, '$app_uid'); Validator::appUid($app_uid, '$app_uid'); Validator::isInteger($del_index, '$del_index'); $oCase = new \Cases(); $aCaseField = $oCase->loadCase($app_uid, $del_index); $tas_uid = $aCaseField["TAS_UID"]; $pro_uid = $aCaseField["PRO_UID"]; $oApplication = new \Applications(); $aField = $oApplication->getSteps($app_uid, $del_index, $tas_uid, $pro_uid); return $aField; }
/** * Verify field definition * * @param array $aData Unique id of Variable to exclude * */ public function throwExceptionFieldDefinition($aData) { try { if (isset($aData["VAR_NAME"])) { Validator::isString($aData['VAR_NAME'], '$var_name'); Validator::isNotEmpty($aData['VAR_NAME'], '$var_name'); } if (isset($aData["VAR_FIELD_TYPE"])) { Validator::isString($aData['VAR_FIELD_TYPE'], '$var_field_type'); Validator::isNotEmpty($aData['VAR_FIELD_TYPE'], '$var_field_type'); /*if ($aData["VAR_FIELD_TYPE"] != 'string' && $aData["VAR_FIELD_TYPE"] != 'integer' && $aData["VAR_FIELD_TYPE"] != 'boolean' && $aData["VAR_FIELD_TYPE"] != 'float' && $aData["VAR_FIELD_TYPE"] != 'datetime' && $aData["VAR_FIELD_TYPE"] != 'date_of_birth' && $aData["VAR_FIELD_TYPE"] != 'date') { throw new \Exception(\G::LoadTranslation("ID_INVALID_VALUE_FOR", array('$var_field_type'))); }*/ } if (isset($aData["VAR_FIELD_SIZE"])) { Validator::isInteger($aData["VAR_FIELD_SIZE"], '$var_field_size'); } if (isset($aData["VAR_LABEL"])) { Validator::isString($aData['VAR_LABEL'], '$var_label'); Validator::isNotEmpty($aData['VAR_LABEL'], '$var_label'); } if (isset($aData["VAR_DBCONNECTION"])) { Validator::isString($aData['VAR_DBCONNECTION'], '$var_dbconnection'); } if (isset($aData["VAR_SQL"])) { Validator::isString($aData['VAR_SQL'], '$var_sql'); } if (isset($aData["VAR_NULL"])) { Validator::isInteger($aData['VAR_NULL'], '$var_null'); if ($aData["VAR_NULL"] != 0 && $aData["VAR_NULL"] != 1) { throw new \Exception(\G::LoadTranslation("ID_INVALID_VALUE_ONLY_ACCEPTS_VALUES", array('$var_null', '0, 1'))); } } } catch (\Exception $e) { throw $e; } }