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


PHP ManiphestTaskPriority::isDisabledPriority方法代码示例

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


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

示例1: buildResults

 private function buildResults()
 {
     $results = array();
     $priority_map = ManiphestTaskPriority::getTaskPriorityMap();
     foreach ($priority_map as $value => $name) {
         $result = id(new PhabricatorTypeaheadResult())->setIcon(ManiphestTaskPriority::getTaskPriorityIcon($value))->setPHID($value)->setName($name)->addAttribute(pht('Priority'));
         if (ManiphestTaskPriority::isDisabledPriority($value)) {
             $result->setClosed(pht('Disabled'));
         }
         $results[$value] = $result;
     }
     return $results;
 }
开发者ID:rchicoli,项目名称:phabricator,代码行数:13,代码来源:ManiphestTaskPriorityDatasource.php

示例2: buildTransactions

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

示例3: getTaskPriorityMap

 private function getTaskPriorityMap(ManiphestTask $task)
 {
     $priority_map = ManiphestTaskPriority::getTaskPriorityMap();
     $current_priority = $task->getPriority();
     // If the current value isn't a legitimate one, put it in the dropdown
     // anyway so saving the form doesn't cause a side effects.
     if (idx($priority_map, $current_priority) === null) {
         $priority_map[$current_priority] = pht('<Unknown: %s>', $current_priority);
     }
     foreach ($priority_map as $priority => $priority_name) {
         // Always keep the current priority.
         if ($priority == $current_priority) {
             continue;
         }
         if (ManiphestTaskPriority::isDisabledPriority($priority)) {
             unset($priority_map[$priority]);
             continue;
         }
     }
     return $priority_map;
 }
开发者ID:fuding,项目名称:phabricator,代码行数:21,代码来源:ManiphestEditEngine.php


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