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