當前位置: 首頁>>代碼示例>>PHP>>正文


PHP XenForo_DataWriter::set方法代碼示例

本文整理匯總了PHP中XenForo_DataWriter::set方法的典型用法代碼示例。如果您正苦於以下問題:PHP XenForo_DataWriter::set方法的具體用法?PHP XenForo_DataWriter::set怎麽用?PHP XenForo_DataWriter::set使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在XenForo_DataWriter的用法示例。


在下文中一共展示了XenForo_DataWriter::set方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: Team_actionAddThread

 public function Team_actionAddThread(XenForo_DataWriter $dw)
 {
     $teamId = $this->_input->filterSingle('team_id', XenForo_Input::UINT);
     $team = $this->getModelFromCache('Nobita_Teams_Model_Team')->getFullTeamById($teamId, array('join' => Nobita_Teams_Model_Team::FETCH_CATEGORY));
     if (!$team) {
         // normal post.. outside of groups.
     } else {
         if (!$this->getModelFromCache('Nobita_Teams_Model_Thread')->canAddThread($team, $team, $error)) {
             // nothing to do
         } else {
             $dw->set('team_id', $team['team_id']);
             $dw->set('discussion_type', 'team');
         }
     }
     unset($GLOBALS[Nobita_Teams_Listener::TEAM_CONTROLLERPUBLIC_FORUM_ADDTHREAD]);
 }
開發者ID:Sywooch,項目名稱:forums,代碼行數:16,代碼來源:Forum.php

示例2: schedule

 public function schedule($optionId, XenForo_DataWriter $dw, $dwField, $key = false)
 {
     extract($this->_getTargets($optionId, $key));
     if (!empty($included)) {
         $dw->set($dwField, array('targets' => $targets));
     }
 }
開發者ID:Sywooch,項目名稱:forums,代碼行數:7,代碼來源:SocialShare.php

示例3: SocialGroups_actionSave

 public function SocialGroups_actionSave(XenForo_DataWriter $dw)
 {
     $teamId = $this->_input->filterSingle('team_id', XenForo_Input::UINT);
     if (empty($teamId)) {
         return;
     }
     $teamModel = $this->getModelFromCache('Nobita_Teams_Model_Team');
     $team = $teamModel->getFullTeamById($teamId, array('join' => Nobita_Teams_Model_Team::FETCH_CATEGORY));
     if (!$team) {
         // not found? so using default XenGallery
         return;
     }
     if (!$teamModel->canViewTeamAndContainer($team, $team, $error)) {
         // don't have permission to view Group
         return;
     }
     if (!$teamModel->canViewTabAndContainer('photos', $team, $team)) {
         // disable this tab... so can't make any albums
         return;
     }
     $dw->set('team_id', $team['team_id']);
     unset($GLOBALS[Nobita_Teams_Listener::XENGALLERY_CONTROLLERPUBLIC_ALBUM_ACTIONSAVE]);
 }
開發者ID:Sywooch,項目名稱:forums,代碼行數:23,代碼來源:Album.php


注:本文中的XenForo_DataWriter::set方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。