/** * Returns an autodetected path to a template based on * the private path of the given action. * * @param DF_Web_Action $action * @return string */ protected static function template_from_action($action) { if (!$action instanceof DF_Web_Action) { throw new DF_Error_InvalidArgumentException('action', $action, DF_Web_Action); } $template = sprintf('%s.tpl', $action->get_private_path()); return $template; }