/** * Return the class that defines the given action, so that we know where to check allowed_actions. * Overrides RequestHandler to also look at defined templates */ protected function definingClassForAction($action) { $definingClass = parent::definingClassForAction($action); if ($definingClass) { return $definingClass; } $class = get_class($this); while ($class != 'RequestHandler') { $templateName = strtok($class, '_') . '_' . $action; if (SSViewer::hasTemplate($templateName)) { return $class; } $class = get_parent_class($class); } }