本文整理汇总了PHP中TBGContext::getScope方法的典型用法代码示例。如果您正苦于以下问题:PHP TBGContext::getScope方法的具体用法?PHP TBGContext::getScope怎么用?PHP TBGContext::getScope使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TBGContext
的用法示例。
在下文中一共展示了TBGContext::getScope方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: deleteProcessedMessages
public function deleteProcessedMessages($ids)
{
$crit = $this->getCriteria();
$crit->addWhere(self::ID, (array) $ids, B2DBCriteria::DB_IN);
$crit->addWhere(self::SCOPE, TBGContext::getScope()->getID());
$res = $this->doDelete($crit);
}
示例2: do_execute
public function do_execute()
{
$this->cliEcho("Importing articles ... \n", 'white', 'bold');
TBGEvent::listen('publish', 'fixture_article_loaded', array($this, 'listenPublishFixtureArticleCreated'));
$overwrite = (bool) ($this->getProvidedArgument('overwrite', 'no') == 'yes');
TBGPublish::getModule()->loadFixturesArticles(TBGContext::getScope()->getID(), $overwrite);
}
示例3: deleteBySearchID
public function deleteBySearchID($saved_search_id)
{
$crit = $this->getCriteria();
$crit->addWhere(self::SCOPE, TBGContext::getScope()->getID());
$crit->addWhere(self::SEARCH_ID, $saved_search_id);
$this->doDelete($crit);
}
示例4: getAll
public function getAll()
{
$crit = $this->getCriteria();
$crit->addWhere(self::SCOPE, TBGContext::getScope()->getID());
$crit->addOrderBy(self::ID, Criteria::SORT_ASC);
return $this->select($crit);
}
示例5: getByID
public function getByID($id)
{
$crit = $this->getCriteria();
$crit->addWhere(self::SCOPE, TBGContext::getScope()->getID());
$row = $this->doSelectById($id, $crit, false);
return $row;
}
示例6: countTeams
public function countTeams()
{
$crit = $this->getCriteria();
$crit->addWhere(self::SCOPE, TBGContext::getScope()->getID());
$crit->addWhere(self::ONDEMAND, false);
return $this->doCount($crit);
}
示例7: quickfind
public function quickfind($client_name)
{
$crit = $this->getCriteria();
$crit->addWhere(self::NAME, "%{$client_name}%", Criteria::DB_LIKE);
$crit->addWhere(self::SCOPE, TBGContext::getScope()->getID());
return $this->select($crit);
}
示例8: doesGroupNameExist
public function doesGroupNameExist($group_name)
{
$crit = $this->getCriteria();
$crit->addWhere(self::NAME, $group_name);
$crit->addWhere(self::SCOPE, TBGContext::getScope()->getID());
return (bool) $this->doCount($crit);
}
示例9: _uninstall
protected function _uninstall()
{
if (TBGContext::getScope()->getID() == 1) {
TBGVCSIntegrationTable::getTable()->drop();
}
parent::_uninstall();
}
示例10: getByTransitionID
public function getByTransitionID($transition_id)
{
$crit = $this->getCriteria();
$crit->addWhere(self::SCOPE, TBGContext::getScope()->getID());
$crit->addWhere(self::TRANSITION_ID, $transition_id);
return $this->doSelect($crit);
}
示例11: countWorkflows
public function countWorkflows($scope = null)
{
$scope = $scope === null ? TBGContext::getScope()->getID() : $scope;
$crit = $this->getCriteria();
$crit->addWhere(self::SCOPE, $scope);
return $this->doCount($crit);
}
示例12: addStarredArticle
public function addStarredArticle($user_id, $article_id)
{
$crit = $this->getCriteria();
$crit->addInsert(self::ARTICLE, $article_id);
$crit->addInsert(self::UID, $user_id);
$crit->addInsert(self::SCOPE, TBGContext::getScope()->getID());
$this->doInsert($crit);
}
示例13: getAll
public function getAll($scope = null)
{
$scope = $scope === null ? TBGContext::getScope()->getID() : $scope;
$crit = $this->getCriteria();
$crit->addWhere(self::SCOPE, $scope);
$res = $this->doSelect($crit);
return $res;
}
示例14: removeFriendByUserID
public function removeFriendByUserID($user_id, $friend_id)
{
$crit = $this->getCriteria();
$crit->addWhere(self::UID, $user_id);
$crit->addWhere(self::BID, $friend_id);
$crit->addWhere(self::SCOPE, TBGContext::getScope()->getID());
$this->doDelete($crit);
}
示例15: clearDefaultsByEditionID
public function clearDefaultsByEditionID($edition_id)
{
$crit = $this->getCriteria();
$crit->addUpdate(self::IS_DEFAULT, false);
$crit->addWhere(self::SCOPE, TBGContext::getScope()->getID());
$crit->addWhere(self::EDITION, $edition_id);
$res = $this->doUpdate($crit);
}