public function templates()
 {
     if (!($tool = $this->_getAppTool(__FUNCTION__, __CLASS__))) {
         $tool = new TemplateGenerator();
         $tool->app = $this->app;
         $tool->setTemplateContext(new AclTemplateContext());
         $tool->defaultModule = $this->module;
         $this->_setAppTool(__FUNCTION__, $tool);
     }
     return $tool;
 }
 /** @return TemplateGenerator */
 public function appTemplates()
 {
     if ($tool = $this->_getAppTool(__FUNCTION__, __CLASS__)) {
         return $tool;
     }
     $tool = new TemplateGenerator();
     $tool->app = $this->app;
     $tool->setTemplateContext(new AppTemplateContext());
     $this->_setAppTool(__FUNCTION__, $tool);
     return $tool;
 }