本文整理汇总了PHP中ManiphestTaskStatus::getClosedStatusConstants方法的典型用法代码示例。如果您正苦于以下问题:PHP ManiphestTaskStatus::getClosedStatusConstants方法的具体用法?PHP ManiphestTaskStatus::getClosedStatusConstants怎么用?PHP ManiphestTaskStatus::getClosedStatusConstants使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ManiphestTaskStatus
的用法示例。
在下文中一共展示了ManiphestTaskStatus::getClosedStatusConstants方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute
protected function execute(ConduitAPIRequest $request)
{
$results = array('defaultStatus' => ManiphestTaskStatus::getDefaultStatus(), 'defaultClosedStatus' => ManiphestTaskStatus::getDefaultClosedStatus(), 'duplicateStatus' => ManiphestTaskStatus::getDuplicateStatus(), 'openStatuses' => ManiphestTaskStatus::getOpenStatusConstants(), 'closedStatuses' => ManiphestTaskStatus::getClosedStatusConstants(), 'allStatuses' => array_keys(ManiphestTaskStatus::getTaskStatusMap()), 'statusMap' => ManiphestTaskStatus::getTaskStatusMap());
return $results;
}
示例2: buildStatusWhereClause
private function buildStatusWhereClause(AphrontDatabaseConnection $conn)
{
static $map = array(self::STATUS_RESOLVED => ManiphestTaskStatus::STATUS_CLOSED_RESOLVED, self::STATUS_WONTFIX => ManiphestTaskStatus::STATUS_CLOSED_WONTFIX, self::STATUS_INVALID => ManiphestTaskStatus::STATUS_CLOSED_INVALID, self::STATUS_SPITE => ManiphestTaskStatus::STATUS_CLOSED_SPITE, self::STATUS_DUPLICATE => ManiphestTaskStatus::STATUS_CLOSED_DUPLICATE);
switch ($this->status) {
case self::STATUS_ANY:
return null;
case self::STATUS_OPEN:
return qsprintf($conn, 'task.status IN (%Ls)', ManiphestTaskStatus::getOpenStatusConstants());
case self::STATUS_CLOSED:
return qsprintf($conn, 'task.status IN (%Ls)', ManiphestTaskStatus::getClosedStatusConstants());
default:
$constant = idx($map, $this->status);
if (!$constant) {
throw new Exception(pht("Unknown status query '%s'!", $this->status));
}
return qsprintf($conn, 'task.status = %s', $constant);
}
}