本文整理汇总了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]);
}
示例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));
}
}
示例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]);
}