本文整理汇总了PHP中TBGSettings::getUserSetting方法的典型用法代码示例。如果您正苦于以下问题:PHP TBGSettings::getUserSetting方法的具体用法?PHP TBGSettings::getUserSetting怎么用?PHP TBGSettings::getUserSetting使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TBGSettings
的用法示例。
在下文中一共展示了TBGSettings::getUserSetting方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _postSave
protected function _postSave($is_new)
{
if ($is_new) {
$tty = $this->getTargetType();
$tid = $this->getTargetID();
if (array_key_exists($tty, self::$_comment_count) && array_key_exists($tid, self::$_comment_count[$tty]) && array_key_exists((int) $this->isSystemComment(), self::$_comment_count[$tty][$tid])) {
self::$_comment_count[$tty][$tid][(int) $this->isSystemComment()]++;
}
if (!$this->isSystemComment()) {
if ($this->_getParser()->hasMentions()) {
foreach ($this->_getParser()->getMentions() as $user) {
if ($user->getID() == TBGContext::getUser()->getID()) {
continue;
}
$this->_addNotification(TBGNotification::TYPE_COMMENT_MENTIONED, $user);
}
}
if ($this->getTargetType() == self::TYPE_ISSUE) {
$this->_addIssueNotifications();
if (TBGSettings::getUserSetting(TBGSettings::SETTINGS_USER_SUBSCRIBE_CREATED_UPDATED_COMMENTED_ISSUES, $this->getPostedByID())) {
$this->getTarget()->addSubscriber($this->getPostedByID());
}
}
if ($this->getTargetType() == self::TYPE_ARTICLE) {
if (TBGSettings::getUserSetting(TBGSettings::SETTINGS_USER_SUBSCRIBE_CREATED_UPDATED_COMMENTED_ARTICLES, $this->getPostedByID())) {
$this->getTarget()->addSubscriber($this->getPostedByID());
}
}
}
}
}
示例2: _getOrGenerateRssKey
protected function _getOrGenerateRssKey()
{
static $key;
$key = $key === null ? TBGSettings::getUserSetting($this->getID(), TBGSettings::USER_RSS_KEY) : $key;
if ($key === null) {
$key = $this->_generateRssKey();
}
return $key;
}
示例3: _postSave
protected function _postSave($is_new)
{
$this->_saveCustomFieldValues();
if (!$is_new) {
$related_issues_to_save = $this->_processChanges();
$comment = isset($this->_save_comment) ? $this->_save_comment : $this->addSystemComment('', TBGContext::getUser()->getID());
$this->triggerSaveEvent($comment, TBGContext::getUser());
if (count($related_issues_to_save)) {
foreach (array_keys($related_issues_to_save) as $i_id) {
$related_issue = TBGIssuesTable::getTable()->selectById((int) $i_id);
$related_issue->save();
}
}
} else {
$this->addLogEntry(TBGLogTable::LOG_ISSUE_CREATED, null, false, $this->getPosted());
$this->_addCreateNotifications($this->getPostedBy());
TBGEvent::createNew('core', 'TBGIssue::createNew', $this)->trigger();
}
if (in_array(TBGSettings::getUserSetting(TBGSettings::SETTINGS_USER_SUBSCRIBE_CREATED_UPDATED_COMMENTED_ISSUES, TBGContext::getUser()->getID()), array(null, true))) {
$this->addSubscriber(TBGContext::getUser()->getID());
}
$this->_clearChangedProperties();
$this->_log_items_added = array();
$this->getProject()->clearRecentActivities();
if ($this->getMilestone() instanceof TBGMilestone) {
$this->getMilestone()->updateStatus();
}
return true;
}