本文整理汇总了PHP中thebuggenie\core\framework\Context::getScope方法的典型用法代码示例。如果您正苦于以下问题:PHP Context::getScope方法的具体用法?PHP Context::getScope怎么用?PHP Context::getScope使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类thebuggenie\core\framework\Context
的用法示例。
在下文中一共展示了Context::getScope方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getByID
public function getByID($id)
{
$crit = $this->getCriteria();
$crit->addWhere(self::SCOPE, framework\Context::getScope()->getID());
$row = $this->doSelectById($id, $crit, false);
return $row;
}
示例2: quickfind
public function quickfind($client_name)
{
$crit = $this->getCriteria();
$crit->addWhere(self::NAME, "%{$client_name}%", Criteria::DB_LIKE);
$crit->addWhere(self::SCOPE, framework\Context::getScope()->getID());
return $this->select($crit);
}
示例3: do_execute
public function do_execute()
{
$this->cliEcho("Importing articles ... \n", 'white', 'bold');
\thebuggenie\core\framework\Event::listen('publish', 'fixture_article_loaded', array($this, 'listenPublishFixtureArticleCreated'));
$overwrite = (bool) ($this->getProvidedArgument('overwrite', 'no') == 'yes');
\thebuggenie\core\framework\Context::getModule('publish')->loadFixturesArticles(\thebuggenie\core\framework\Context::getScope()->getID(), $overwrite);
}
示例4: markUserNotificationsReadByTypesAndId
public function markUserNotificationsReadByTypesAndId($types, $id, $user_id)
{
if (!is_array($types)) {
$types = array($types);
}
$crit = $this->getCriteria();
$crit->addWhere(self::USER_ID, $user_id);
if (count($types)) {
if (is_array($id)) {
$crit->addWhere(self::TARGET_ID, $id, Criteria::DB_IN);
} else {
$crit->addWhere(self::TARGET_ID, $id);
}
$crit->addWhere(self::NOTIFICATION_TYPE, $types, Criteria::DB_IN);
}
$crit->addWhere(self::SCOPE, framework\Context::getScope()->getID());
$crit->addUpdate(self::IS_READ, true);
$this->doUpdate($crit);
$crit = $this->getCriteria();
$crit->addWhere(self::USER_ID, $user_id);
$crit->addWhere(self::SCOPE, framework\Context::getScope()->getID());
$crit->addWhere(self::IS_READ, true);
$crit->addWhere('notifications.created_at', NOW - 86400 * 30, Criteria::DB_LESS_THAN_EQUAL);
$this->doDelete($crit);
}
示例5: deleteProcessedMessages
public function deleteProcessedMessages($ids)
{
$crit = $this->getCriteria();
$crit->addWhere(self::ID, (array) $ids, Criteria::DB_IN);
$crit->addWhere(self::SCOPE, framework\Context::getScope()->getID());
$res = $this->doDelete($crit);
}
示例6: countTeams
public function countTeams()
{
$crit = $this->getCriteria();
$crit->addWhere(self::SCOPE, framework\Context::getScope()->getID());
$crit->addWhere(self::ONDEMAND, false);
return $this->doCount($crit);
}
示例7: countWorkflows
public function countWorkflows($scope = null)
{
$scope = $scope === null ? framework\Context::getScope()->getID() : $scope;
$crit = $this->getCriteria();
$crit->addWhere(self::SCOPE, $scope);
return $this->doCount($crit);
}
示例8: deleteBySearchID
public function deleteBySearchID($saved_search_id)
{
$crit = $this->getCriteria();
$crit->addWhere(self::SCOPE, framework\Context::getScope()->getID());
$crit->addWhere(self::SEARCH_ID, $saved_search_id);
$this->doDelete($crit);
}
示例9: doesGroupNameExist
public function doesGroupNameExist($group_name)
{
$crit = $this->getCriteria();
$crit->addWhere(self::NAME, $group_name);
$crit->addWhere(self::SCOPE, framework\Context::getScope()->getID());
return (bool) $this->doCount($crit);
}
示例10: getAll
public function getAll()
{
$crit = $this->getCriteria();
$crit->addWhere(self::SCOPE, framework\Context::getScope()->getID());
$crit->addOrderBy(self::ID, Criteria::SORT_ASC);
return $this->select($crit);
}
示例11: getByTransitionID
public function getByTransitionID($transition_id)
{
$crit = $this->getCriteria();
$crit->addWhere(self::SCOPE, framework\Context::getScope()->getID());
$crit->addWhere(self::TRANSITION_ID, $transition_id);
return $this->select($crit);
}
示例12: addStarredIssue
public function addStarredIssue($user_id, $issue_id)
{
$crit = $this->getCriteria();
$crit->addInsert(self::ISSUE, $issue_id);
$crit->addInsert(self::UID, $user_id);
$crit->addInsert(self::SCOPE, framework\Context::getScope()->getID());
$this->doInsert($crit);
}
示例13: 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, framework\Context::getScope()->getID());
$this->doInsert($crit);
}
示例14: deleteByIssuetypeID
public function deleteByIssuetypeID($issuetype_id)
{
$crit = $this->getCriteria();
$crit->addWhere(self::ISSUETYPE_ID, $issuetype_id);
$crit->addWhere(self::SCOPE, framework\Context::getScope()->getID());
$this->doDelete($crit);
return true;
}
示例15: getByIssueID
/**
* Get all rows by issue ID
* @param integer $id
* @return \b2db\Row
*/
public function getByIssueID($id, $scope = null)
{
$scope = $scope === null ? \thebuggenie\core\framework\Context::getScope()->getID() : $scope;
$crit = $this->getCriteria();
$crit->addWhere(self::SCOPE, $scope);
$crit->addWhere(self::ISSUE_NO, $id);
return $this->select($crit);
}