/** * Setup the handling of the actions. This is needed for the custom URL Actions set in the SiteConfig * @param SS_Request $request The given request * @param string $action The requested action * @return parent::handleAction */ public function handleAction($request, $action) { $handles = parent::allowedActions(false); $defaultMapping = $this->stat('allowed_actions'); $handles['index'] = 'handleIndex'; $siteConfig = $this->getCurrentSiteConfig(); foreach ($defaultMapping as $key) { $map = ucfirst($key . 'Action'); if ($siteConfig->{$map}) { $handles[$siteConfig->{$map}] = $key; } if (!isset($handles[$key])) { $handles[$key] = $key; } } self::$url_handlers = $handles; $this->needsRedirect(); return parent::handleAction($request, $handles[$action]); }