commit 79bfb87d82b1bc899f956fb9de18e622fc8512d9 parent a7d87edcfbd36f49f994c22c4967797580c49fac Author: Jan Dankert <devnull@localhost> Date: Wed, 29 Aug 2018 23:07:10 +0200 Eine Action kann an eine weitere Methode delegieren. Von dieser neuen Methode wird dann auch das Template ermittelt. Diffstat:
modules/cms-core/action/Action.class.php | | | 12 | +++++++----- |
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/modules/cms-core/action/Action.class.php b/modules/cms-core/action/Action.class.php @@ -277,15 +277,17 @@ namespace cms\action { /** - * Ruft eine weitere Subaction auf. + * Calling another action method. * - * @param String $subActionName Name der n�chsten Subaction. Es muss eine Methode mit diesem Namen geben. + * @param String $method Name of next method to call. */ - protected function nextSubAction($subActionName) + protected function nextSubAction($method) { - Logger::trace("next subaction is '$subActionName'"); + Logger::trace("next subaction is '$method'"); + + $this->request->method = $method; - $methodName = $subActionName . ($_SERVER['REQUEST_METHOD'] == 'POST' ? 'Post' : 'View'); + $methodName = $method . ($_SERVER['REQUEST_METHOD'] == 'POST' ? 'Post' : 'View'); $this->$methodName(); }