Пример #1
0
 public static function responseView(XenForo_Controller $controller, XenForo_Input $input, array $params = array())
 {
     self::$controller = $controller;
     self::$input = $input;
     $setup = Nobita_Teams_Setup::getInstance();
     self::$setup = $setup;
     $provider = $setup->getOption('photoProvider');
     if ($provider == 'sonnb_xengallery') {
         $params = array_merge($params, self::_sonnbPhotoIndexParams());
     } else {
         if ($provider == 'XenGallery') {
             $params = array_merge($params, self::_xenMediaPhotoIndexParams($params['team']));
         }
     }
     return $controller->getHelper('Nobita_Teams_ControllerHelper_Team')->getTeamViewWrapper('photos', $params['team'], $params['category'], $controller->responseView($params['viewName'], $params['templateName'], $params));
 }
Пример #2
0
 public function actionPhotos()
 {
     list($team, $category) = $this->_getTeamHelper()->assertTeamValidAndViewable();
     if (!$this->_getTeamModel()->canViewTabAndContainer('photos', $team, $category, $error)) {
         throw $this->getErrorOrNoPermissionResponseException($error);
     }
     return Nobita_Teams_Helper_Photo::responseView($this, $this->_input, array('team' => $team, 'category' => $category));
 }