예제 #1
0
 public function forTemplate()
 {
     $controller = ModuleAsController::controller_for($this);
     //backwards compatibility support for Modules directly handling actions
     if ($controller instanceof ModuleController) {
         $controller->setRequest(Controller::curr()->getRequest());
         $controller->setFailover($this);
     }
     return $controller->renderWith(array_reverse(ClassInfo::ancestry($this->class)));
 }