Commit f787d278d5d23bea974e599137dd71e766dd19d4
1 parent
573ca0b7
Introduce the concept of a document action slot, in preparation for
future plans. git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4977 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
9 additions
and
8 deletions
lib/actions/documentaction.inc.php
| ... | ... | @@ -131,13 +131,14 @@ class KTDocumentAction extends KTStandardDispatcher { |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | class KTDocumentActionUtil { |
| 134 | - function getDocumentActionInfo() { | |
| 134 | + function getDocumentActionInfo($slot = "documentaction") { | |
| 135 | 135 | $oRegistry =& KTActionRegistry::getSingleton(); |
| 136 | - return $oRegistry->getActions('documentaction'); | |
| 136 | + return $oRegistry->getActions($slot); | |
| 137 | 137 | } |
| 138 | - function &getDocumentActionsForDocument($oDocument, $oUser) { | |
| 138 | + | |
| 139 | + function &getDocumentActionsForDocument($oDocument, $oUser, $slot = "documentaction") { | |
| 139 | 140 | $aObjects = array(); |
| 140 | - foreach (KTDocumentActionUtil::getDocumentActionInfo() as $aAction) { | |
| 141 | + foreach (KTDocumentActionUtil::getDocumentActionInfo($slot) as $aAction) { | |
| 141 | 142 | list($sClassName, $sPath, $sPlugin) = $aAction; |
| 142 | 143 | $oRegistry =& KTPluginRegistry::getSingleton(); |
| 143 | 144 | $oPlugin =& $oRegistry->getPlugin($sPlugin); |
| ... | ... | @@ -149,11 +150,11 @@ class KTDocumentActionUtil { |
| 149 | 150 | return $aObjects; |
| 150 | 151 | } |
| 151 | 152 | |
| 152 | - function getAllDocumentActions() { | |
| 153 | + function getAllDocumentActions($slot = "documentaction") { | |
| 153 | 154 | $aObjects = array(); |
| 154 | 155 | $oDocument = null; |
| 155 | 156 | $oUser = null; |
| 156 | - foreach (KTDocumentActionUtil::getDocumentActionInfo() as $aAction) { | |
| 157 | + foreach (KTDocumentActionUtil::getDocumentActionInfo($slot) as $aAction) { | |
| 157 | 158 | list($sClassName, $sPath, $sName, $sPlugin) = $aAction; |
| 158 | 159 | $oRegistry =& KTPluginRegistry::getSingleton(); |
| 159 | 160 | $oPlugin =& $oRegistry->getPlugin($sPlugin); |
| ... | ... | @@ -165,11 +166,11 @@ class KTDocumentActionUtil { |
| 165 | 166 | return $aObjects; |
| 166 | 167 | } |
| 167 | 168 | |
| 168 | - function getDocumentActionsByNames($aNames) { | |
| 169 | + function getDocumentActionsByNames($aNames, $slot = "documentaction") { | |
| 169 | 170 | $aObjects = array(); |
| 170 | 171 | $oDocument = null; |
| 171 | 172 | $oUser = null; |
| 172 | - foreach (KTDocumentActionUtil::getDocumentActionInfo() as $aAction) { | |
| 173 | + foreach (KTDocumentActionUtil::getDocumentActionInfo($slot) as $aAction) { | |
| 173 | 174 | list($sClassName, $sPath, $sName, $sPlugin) = $aAction; |
| 174 | 175 | $oRegistry =& KTPluginRegistry::getSingleton(); |
| 175 | 176 | $oPlugin =& $oRegistry->getPlugin($sPlugin); | ... | ... |