本文整理汇总了PHP中eZWorkflow::fetchLimited方法的典型用法代码示例。如果您正苦于以下问题:PHP eZWorkflow::fetchLimited方法的具体用法?PHP eZWorkflow::fetchLimited怎么用?PHP eZWorkflow::fetchLimited使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZWorkflow
的用法示例。
在下文中一共展示了eZWorkflow::fetchLimited方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fetchAllowedWorkflows
function fetchAllowedWorkflows()
{
$connectionType = '*';
if ($this->attribute('connect_type') == 'b') {
$connectionType = 'before';
} else {
if ($this->attribute('connect_type') == 'a') {
$connectionType = 'after';
}
}
return eZWorkflow::fetchLimited($this->attribute('module_name'), $this->attribute('function_name'), $connectionType);
}
示例2: explode
$explodedOperation = explode('_', $operation);
$i = 0;
if (sizeof($explodedOperation) >= 3) {
if (strcmp($explodedOperation[$i], "before") == 0 || strcmp($explodedOperation[$i], "after") == 0) {
$moduleParts = array($explodedOperation[$i++]);
}
} else {
$moduleParts = array("before", "after");
}
foreach ($moduleParts as $trigger['connect_type']) {
$trigger['module'] = $explodedOperation[$i];
// $i is either 0 or 1
$trigger['operation'] = $explodedOperation[$i + 1];
$trigger['workflow_id'] = 0;
$trigger['key'] = $trigger['module'] . '_' . $trigger['operation'] . '_' . $trigger['connect_type'][0];
$trigger['allowed_workflows'] = eZWorkflow::fetchLimited($trigger['module'], $trigger['operation'], $trigger['connect_type']);
foreach ($triggers as $existendTrigger) {
if ($existendTrigger->attribute('module_name') == $trigger['module'] && $existendTrigger->attribute('function_name') == $trigger['operation'] && $existendTrigger->attribute('connect_type') == $trigger['connect_type'][0]) {
$trigger['workflow_id'] = $existendTrigger->attribute('workflow_id');
}
}
$possibleTriggers[] = $trigger;
}
}
if ($http->hasPostVariable('StoreButton')) {
$db = eZDB::instance();
$db->begin();
foreach ($possibleTriggers as $trigger) {
if ($http->hasPostVariable('WorkflowID_' . $trigger['key'])) {
$workflowID = $http->postVariable('WorkflowID_' . $trigger['key']);
if ($workflowID != -1) {