当前位置: 首页>>代码示例>>PHP>>正文


PHP ManiphestTaskStatus::isDisabledStatus方法代码示例

本文整理汇总了PHP中ManiphestTaskStatus::isDisabledStatus方法的典型用法代码示例。如果您正苦于以下问题:PHP ManiphestTaskStatus::isDisabledStatus方法的具体用法?PHP ManiphestTaskStatus::isDisabledStatus怎么用?PHP ManiphestTaskStatus::isDisabledStatus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ManiphestTaskStatus的用法示例。


在下文中一共展示了ManiphestTaskStatus::isDisabledStatus方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: buildResults

 private function buildResults()
 {
     $results = array();
     $status_map = ManiphestTaskStatus::getTaskStatusMap();
     foreach ($status_map as $value => $name) {
         $result = id(new PhabricatorTypeaheadResult())->setIcon(ManiphestTaskStatus::getStatusIcon($value))->setPHID($value)->setName($name);
         if (ManiphestTaskStatus::isDisabledStatus($value)) {
             $result->setClosed(pht('Disabled'));
         }
         $results[$value] = $result;
     }
     return $results;
 }
开发者ID:pugong,项目名称:phabricator,代码行数:13,代码来源:ManiphestTaskStatusDatasource.php

示例2: buildTransactions

 public function buildTransactions(PhabricatorUser $viewer, PhabricatorApplicationTransactionInterface $object, PhabricatorMetaMTAReceivedMail $mail, $command, array $argv)
 {
     $xactions = array();
     $target = phutil_utf8_strtolower(head($argv));
     $status = null;
     $keywords = ManiphestTaskStatus::getTaskStatusKeywordsMap();
     foreach ($keywords as $key => $words) {
         foreach ($words as $word) {
             if ($word == $target) {
                 $status = $key;
                 break;
             }
         }
     }
     if ($status === null) {
         return array();
     }
     if (ManiphestTaskStatus::isDisabledStatus($status)) {
         return array();
     }
     $xactions[] = $object->getApplicationTransactionTemplate()->setTransactionType(ManiphestTransaction::TYPE_STATUS)->setNewValue($status);
     return $xactions;
 }
开发者ID:miaokuan,项目名称:phabricator,代码行数:23,代码来源:ManiphestStatusEmailCommand.php

示例3: getTaskStatusMap

 private function getTaskStatusMap(ManiphestTask $task)
 {
     $status_map = ManiphestTaskStatus::getTaskStatusMap();
     $current_status = $task->getStatus();
     // If the current status is something we don't recognize (maybe an older
     // status which was deleted), put a dummy entry in the status map so that
     // saving the form doesn't destroy any data by accident.
     if (idx($status_map, $current_status) === null) {
         $status_map[$current_status] = pht('<Unknown: %s>', $current_status);
     }
     $dup_status = ManiphestTaskStatus::getDuplicateStatus();
     foreach ($status_map as $status => $status_name) {
         // Always keep the task's current status.
         if ($status == $current_status) {
             continue;
         }
         // Don't allow tasks to be changed directly into "Closed, Duplicate"
         // status. Instead, you have to merge them. See T4819.
         if ($status == $dup_status) {
             unset($status_map[$status]);
             continue;
         }
         // Don't let new or existing tasks be moved into a disabled status.
         if (ManiphestTaskStatus::isDisabledStatus($status)) {
             unset($status_map[$status]);
             continue;
         }
     }
     return $status_map;
 }
开发者ID:fuding,项目名称:phabricator,代码行数:30,代码来源:ManiphestEditEngine.php


注:本文中的ManiphestTaskStatus::isDisabledStatus方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。