本文整理匯總了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]);
}