当前位置: 首页>>代码示例>>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;未经允许,请勿转载。