Commit f7b48118f21bc9d55051fdfc9231338f37498ae5

Authored by Neil Blakey-Milner
1 parent 1f5668db

Allow for actions to be looked up by nsname.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3935 c91229c3-7414-0410-bfa2-8a42b809f60b
lib/actions/actionregistry.inc.php
@@ -14,11 +14,16 @@ class KTActionRegistry { @@ -14,11 +14,16 @@ class KTActionRegistry {
14 function registerAction($slot, $name, $nsname, $path = "") { 14 function registerAction($slot, $name, $nsname, $path = "") {
15 $this->actions[$slot] = KTUtil::arrayGet($this->actions, $slot, array()); 15 $this->actions[$slot] = KTUtil::arrayGet($this->actions, $slot, array());
16 $this->actions[$slot][$nsname] = array($name, $path, $nsname); 16 $this->actions[$slot][$nsname] = array($name, $path, $nsname);
  17 + $this->nsnames[$nsname] = array($name, $path, $nsname);
17 } 18 }
18 19
19 function getActions($slot) { 20 function getActions($slot) {
20 return $this->actions[$slot]; 21 return $this->actions[$slot];
21 } 22 }
  23 +
  24 + function getActionByNsname($nsname) {
  25 + return $this->nsnames[$nsname];
  26 + }
22 } 27 }
23 28
24 ?> 29 ?>