本文整理汇总了PHP中PhabricatorSavedQuery::getEvaluatedParameter方法的典型用法代码示例。如果您正苦于以下问题:PHP PhabricatorSavedQuery::getEvaluatedParameter方法的具体用法?PHP PhabricatorSavedQuery::getEvaluatedParameter怎么用?PHP PhabricatorSavedQuery::getEvaluatedParameter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PhabricatorSavedQuery
的用法示例。
在下文中一共展示了PhabricatorSavedQuery::getEvaluatedParameter方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: buildResultGroups
protected function buildResultGroups(PhabricatorSavedQuery $query, array $objects)
{
$this->objects = $objects;
$phids = $query->getEvaluatedParameter('responsiblePHIDs', array());
if (!$phids) {
throw new Exception(pht('You can not bucket results by required action without ' . 'specifying "Responsible Users".'));
}
$phids = array_fuse($phids);
$groups = array();
$groups[] = $this->newGroup()->setName(pht('Must Review'))->setKey(self::KEY_MUSTREVIEW)->setNoDataString(pht('No revisions are blocked on your review.'))->setObjects($this->filterMustReview($phids));
$groups[] = $this->newGroup()->setName(pht('Ready to Review'))->setKey(self::KEY_SHOULDREVIEW)->setNoDataString(pht('No revisions are waiting on you to review them.'))->setObjects($this->filterShouldReview($phids));
$groups[] = $this->newGroup()->setName(pht('Ready to Land'))->setNoDataString(pht('No revisions are ready to land.'))->setObjects($this->filterShouldLand($phids));
$groups[] = $this->newGroup()->setName(pht('Ready to Update'))->setNoDataString(pht('No revisions are waiting for updates.'))->setObjects($this->filterShouldUpdate($phids));
$groups[] = $this->newGroup()->setName(pht('Waiting on Review'))->setNoDataString(pht('None of your revisions are waiting on review.'))->setObjects($this->filterWaitingForReview($phids));
$groups[] = $this->newGroup()->setName(pht('Waiting on Authors'))->setNoDataString(pht('No revisions are waiting on author action.'))->setObjects($this->filterWaitingOnAuthors($phids));
// Because you can apply these buckets to queries which include revisions
// that have been closed, add an "Other" bucket if we still have stuff
// that didn't get filtered into any of the previous buckets.
if ($this->objects) {
$groups[] = $this->newGroup()->setName(pht('Other Revisions'))->setObjects($this->objects);
}
return $groups;
}