当前位置: 首页>>代码示例>>PHP>>正文


PHP TBGSettings::getUserSetting方法代码示例

本文整理汇总了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());
                 }
             }
         }
     }
 }
开发者ID:oparoz,项目名称:thebuggenie,代码行数:31,代码来源:TBGComment.class.php

示例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;
 }
开发者ID:oparoz,项目名称:thebuggenie,代码行数:9,代码来源:TBGUser.class.php

示例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;
 }
开发者ID:oparoz,项目名称:thebuggenie,代码行数:29,代码来源:TBGIssue.class.php


注:本文中的TBGSettings::getUserSetting方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。