本文整理汇总了PHP中Step::load方法的典型用法代码示例。如果您正苦于以下问题:PHP Step::load方法的具体用法?PHP Step::load怎么用?PHP Step::load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Step
的用法示例。
在下文中一共展示了Step::load方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: switch
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
try {
global $RBAC;
switch ($RBAC->userCanAccess('PM_FACTORY')) {
case -2:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
case -1:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
}
require_once 'classes/model/Step.php';
$oStep = new Step();
$aFields = $oStep->load($_GET['UID']);
G::LoadClass('xmlfield_InputPM');
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'steps/conditions_Edit', '', $aFields, '../steps/conditions_Save');
G::RenderPage('publish-raw', 'raw');
} catch (Exception $oException) {
die($oException->getMessage());
}
示例2: updateAll
/**
* Update Steps of a Task
*
* @param string $stepUid Unique id of Step
* @param array $arrayData Data
*
* return array Return data of the Steps updated
*/
public function updateAll($stepUid, $arrayData)
{
try {
$arrayData = array_change_key_case($arrayData, CASE_UPPER);
//Verify data
$this->throwExceptionIfNotExistsStep($stepUid);
//Load Step
$step = new \Step();
$arrayStepData = $step->load($stepUid);
$taskUid = $arrayStepData["TAS_UID"];
$proUid = $arrayStepData["PRO_UID"];
//Verify data
if (isset($arrayData["STEP_TYPE_OBJ"]) && !isset($arrayData["STEP_UID_OBJ"])) {
throw new \Exception(\G::LoadTranslation("ID_UNDEFINED_VALUE_IS_REQUIRED", array($this->arrayParamException["stepUidObj"])));
}
if (!isset($arrayData["STEP_TYPE_OBJ"]) && isset($arrayData["STEP_UID_OBJ"])) {
throw new \Exception(\G::LoadTranslation("ID_UNDEFINED_VALUE_IS_REQUIRED", array($this->arrayParamException["stepTypeObj"])));
}
if (isset($arrayData["STEP_TYPE_OBJ"])) {
$arrayData["STEP_TYPE_OBJ"] = trim($arrayData["STEP_TYPE_OBJ"]);
if ($arrayData["STEP_TYPE_OBJ"] == "") {
throw new \Exception(\G::LoadTranslation("ID_INVALID_VALUE_CAN_NOT_BE_EMPTY", array($this->arrayParamException["stepTypeObj"])));
}
}
if (isset($arrayData["STEP_UID_OBJ"])) {
$arrayData["STEP_UID_OBJ"] = trim($arrayData["STEP_UID_OBJ"]);
if ($arrayData["STEP_UID_OBJ"] == "") {
throw new \Exception(\G::LoadTranslation("ID_INVALID_VALUE_CAN_NOT_BE_EMPTY", array($this->arrayParamException["stepUidObj"])));
}
}
if (isset($arrayData["STEP_MODE"])) {
$arrayData["STEP_MODE"] = trim($arrayData["STEP_MODE"]);
if ($arrayData["STEP_MODE"] == "") {
throw new \Exception(\G::LoadTranslation("ID_INVALID_VALUE_CAN_NOT_BE_EMPTY", array($this->arrayParamException["stepMode"])));
}
}
if (isset($arrayData["STEP_TYPE_OBJ"])) {
$this->throwExceptionIfHaveInvalidValueInTypeObj($arrayData["STEP_TYPE_OBJ"]);
}
if (isset($arrayData["STEP_MODE"])) {
$this->throwExceptionIfHaveInvalidValueInMode($arrayData["STEP_MODE"]);
}
if (isset($arrayData["STEP_TYPE_OBJ"]) && isset($arrayData["STEP_UID_OBJ"])) {
$msg = $this->existsObjectUid($arrayData["STEP_TYPE_OBJ"], $arrayData["STEP_UID_OBJ"], $this->arrayParamException["stepUidObj"]);
if ($msg != "") {
throw new \Exception($msg);
}
if ($this->existsRecord($taskUid, $arrayData["STEP_TYPE_OBJ"], $arrayData["STEP_UID_OBJ"], 0, $stepUid)) {
throw new \Exception(\G::LoadTranslation("ID_RECORD_EXISTS_IN_TABLE", array($taskUid . ", " . $arrayData["STEP_TYPE_OBJ"] . ", " . $arrayData["STEP_UID_OBJ"], "STEP")));
}
}
//Update
$step = new \Step();
$arrayData["STEP_UID"] = $stepUid;
$result = $step->update($arrayData);
//Return
unset($arrayData["STEP_UID"]);
if (!$this->formatFieldNameInUppercase) {
$arrayData = array_change_key_case($arrayData, CASE_LOWER);
}
return $arrayData;
} catch (\Exception $e) {
throw $e;
}
}
示例3: LoadStep
function LoadStep($data, $fields)
{
try {
$Step = new Step();
$result = $Step->load($fields['STEP_UID']);
return $result;
} catch (Exception $e) {
return array('Exception!! ' => $e->getMessage());
}
}