本文整理汇总了PHP中Step::getAttribute方法的典型用法代码示例。如果您正苦于以下问题:PHP Step::getAttribute方法的具体用法?PHP Step::getAttribute怎么用?PHP Step::getAttribute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Step
的用法示例。
在下文中一共展示了Step::getAttribute方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dynaFormDepends
/**
* Verify if a DynaForm is assigned some Steps
*
* @param string $dynaFormUid Unique id of DynaForm
* @param string $processUid Unique id of Process
*
* return bool Return true if a DynaForm is assigned some Steps, false otherwise
*/
public function dynaFormDepends($dynUid, $proUid)
{
$oCriteria = new \Criteria();
$oCriteria->addSelectColumn(\DynaformPeer::DYN_TYPE);
$oCriteria->add(\DynaformPeer::DYN_UID, $dynUid);
$oCriteria->add(\DynaformPeer::PRO_UID, $proUid);
$oDataset = \DynaformPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
$dataDyna = $oDataset->getRow();
if ($dataDyna['DYN_TYPE'] == 'grid') {
$formsDepend = array();
\G::LoadSystem('dynaformhandler');
$oCriteria = new \Criteria('workflow');
$oCriteria->addSelectColumn(\DynaformPeer::DYN_UID);
$oCriteria->addSelectColumn(\ContentPeer::CON_VALUE);
$oCriteria->add(\DynaformPeer::PRO_UID, $proUid);
$oCriteria->add(\DynaformPeer::DYN_TYPE, "xmlform");
$oCriteria->add(\ContentPeer::CON_CATEGORY, 'DYN_TITLE');
$oCriteria->add(\ContentPeer::CON_LANG, SYS_LANG);
$oCriteria->addJoin(\DynaformPeer::DYN_UID, \ContentPeer::CON_ID, \Criteria::INNER_JOIN);
$oDataset = \DynaformPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
while ($oDataset->next()) {
$dataForms = $oDataset->getRow();
$dynHandler = new \dynaFormHandler(PATH_DYNAFORM . $proUid . PATH_SEP . $dataForms["DYN_UID"] . ".xml");
$dynFields = $dynHandler->getFields();
foreach ($dynFields as $field) {
$sType = \Step::getAttribute($field, 'type');
if ($sType == 'grid') {
$sxmlgrid = \Step::getAttribute($field, 'xmlgrid');
$aGridInfo = explode("/", $sxmlgrid);
if ($aGridInfo[0] == $proUid && $aGridInfo[1] == $dynUid) {
$formsDepend[] = $dataForms["CON_VALUE"];
}
}
}
}
if (!empty($formsDepend)) {
$message = "You can not delete the grid '{$dynUid}', because it is in the ";
$message .= count($formsDepend) == 1 ? 'form' : 'forms';
$message .= ': ' . implode(', ', $formsDepend);
return $message;
}
} else {
$flagDepend = false;
$stepsDepends = \Step::verifyDynaformAssigStep($dynUid, $proUid);
$messageSteps = '(0) Depends in steps';
if (!empty($stepsDepends)) {
$flagDepend = true;
$countSteps = count($stepsDepends);
$messTemp = '';
foreach ($stepsDepends as $value) {
$messTemp .= ", the task '" . $value['CON_VALUE'] . "' position " . $value['STEP_POSITION'];
}
$messageSteps = "({$countSteps}) Depends in steps in" . $messTemp;
}
$stepSupervisorsDepends = \StepSupervisor::verifyDynaformAssigStepSupervisor($dynUid, $proUid);
$messageStepsSupervisors = '(0) Depends in steps supervisor';
if (!empty($stepSupervisorsDepends)) {
$flagDepend = true;
$countSteps = count($stepSupervisorsDepends);
$messageStepsSupervisors = "({$countSteps}) Depends in steps supervisor";
}
$objectPermissionDepends = \ObjectPermission::verifyDynaformAssigObjectPermission($dynUid, $proUid);
$messageObjectPermission = '(0) Depends in permissions';
if (!empty($objectPermissionDepends)) {
$flagDepend = true;
$countSteps = count($objectPermissionDepends);
$messageObjectPermission = "({$countSteps}) Depends in permissions";
}
$caseTrackerDepends = \CaseTrackerObject::verifyDynaformAssigCaseTracker($dynUid, $proUid);
$messageCaseTracker = '(0) Depends in case traker';
if (!empty($caseTrackerDepends)) {
$flagDepend = true;
$countSteps = count($caseTrackerDepends);
$messageCaseTracker = "({$countSteps}) Depends in case traker";
}
$dynaformDepends = \Dynaform::verifyDynaformAssignDynaform($dynUid, $proUid);
$messageDynaform = '(0) Depends in case traker';
if (!empty($dynaformDepends)) {
$flagDepend = true;
$countSteps = count($dynaformDepends);
$messageDynaform = "({$countSteps}) Depends in dynaform";
}
if ($flagDepend) {
$message = "You can not delete the dynaform '{$dynUid}', because it has the following dependencies: \n\n";
$message .= $messageSteps . ".\n" . $messageStepsSupervisors . ".\n";
$message .= $messageObjectPermission . ".\n" . $messageCaseTracker . "\n";
$message .= $messageDynaform;
return $message;
}
//.........这里部分代码省略.........