69 $currentStatus = $this->
getTarget()->getDocumentStatus();
70 $allStatuses = array_keys($this->
getTarget()->getDocumentStatusList());
72 $needleKey = array_search($currentStatus, $allStatuses);
74 if ($needleKey ===
false)
79 $forwardStatuses = array_slice($allStatuses, $needleKey + 1);
81 $code = static::getCode();
83 $targetTriggers = $this->
getTarget()->getTriggers($allStatuses);
85 foreach ($targetTriggers as $row)
87 if ($row[
'CODE'] !== $code)
92 if (!in_array($row[
'DOCUMENT_STATUS'], $forwardStatuses))
95 !isset($row[
'APPLY_RULES'][
'ALLOW_BACKWARDS'])
97 $row[
'APPLY_RULES'][
'ALLOW_BACKWARDS'] !==
'Y'
104 $rows[$row[
'DOCUMENT_STATUS']][] = $row;
109 foreach ($allStatuses as $needleStatus)
111 if (isset($rows[$needleStatus]))
113 $triggers = array_merge($triggers, $rows[$needleStatus]);