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


PHP ManiphestTaskPriority::getTaskPriorityColor方法代码示例

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


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

示例1: newTableRow

 protected function newTableRow($phid, $object, $trace)
 {
     $viewer = $this->getViewer();
     if ($object) {
         $status = $object->getStatus();
         $priority = $object->getPriority();
         $status_icon = ManiphestTaskStatus::getStatusIcon($status);
         $status_name = ManiphestTaskStatus::getTaskStatusName($status);
         $priority_color = ManiphestTaskPriority::getTaskPriorityColor($priority);
         if ($object->isClosed()) {
             $priority_color = 'grey';
         }
         $status = array(id(new PHUIIconView())->setIcon($status_icon, $priority_color), ' ', $status_name);
         $owner_phid = $object->getOwnerPHID();
         if ($owner_phid) {
             $assigned = $viewer->renderHandle($owner_phid);
         } else {
             $assigned = phutil_tag('em', array(), pht('None'));
         }
         $link = phutil_tag('a', array('href' => $object->getURI()), $object->getTitle());
         $link = array($object->getMonogram(), ' ', $link);
     } else {
         $status = null;
         $assigned = null;
         $link = $viewer->renderHandle($phid);
     }
     return array($trace, $status, $assigned, $link);
 }
开发者ID:rchicoli,项目名称:phabricator,代码行数:28,代码来源:ManiphestTaskGraph.php

示例2: newTableRow

 protected function newTableRow($phid, $object, $trace)
 {
     $viewer = $this->getViewer();
     if ($object) {
         $status = $object->getStatus();
         $priority = $object->getPriority();
         $status_icon = ManiphestTaskStatus::getStatusIcon($status);
         $status_name = ManiphestTaskStatus::getTaskStatusName($status);
         $priority_color = ManiphestTaskPriority::getTaskPriorityColor($priority);
         if ($object->isClosed()) {
             $priority_color = 'grey';
         }
         $status = array(id(new PHUIIconView())->setIcon($status_icon, $priority_color), ' ', $status_name);
         $owner_phid = $object->getOwnerPHID();
         if ($owner_phid) {
             $assigned = $viewer->renderHandle($owner_phid);
         } else {
             $assigned = phutil_tag('em', array(), pht('None'));
         }
         $full_title = $object->getTitle();
         $title = id(new PhutilUTF8StringTruncator())->setMaximumGlyphs(80)->truncateString($full_title);
         $link = phutil_tag('a', array('href' => $object->getURI(), 'title' => $full_title), $title);
         $link = array(phutil_tag('span', array('class' => 'object-name'), $object->getMonogram()), ' ', $link);
     } else {
         $status = null;
         $assigned = null;
         $link = $viewer->renderHandle($phid);
     }
     if ($this->isParentTask($phid)) {
         $marker = 'fa-chevron-circle-up bluegrey';
         $marker_tip = pht('Direct Parent');
     } else {
         if ($this->isChildTask($phid)) {
             $marker = 'fa-chevron-circle-down bluegrey';
             $marker_tip = pht('Direct Subtask');
         } else {
             $marker = null;
         }
     }
     if ($marker) {
         $marker = id(new PHUIIconView())->setIcon($marker)->addSigil('has-tooltip')->setMetadata(array('tip' => $marker_tip, 'align' => 'E'));
     }
     return array($marker, $trace, $status, $assigned, $link);
 }
开发者ID:endlessm,项目名称:phabricator,代码行数:44,代码来源:ManiphestTaskGraph.php

示例3: buildHeaderView

 private function buildHeaderView(ManiphestTask $task)
 {
     $view = id(new PHUIHeaderView())->setHeader($task->getTitle())->setUser($this->getRequest()->getUser())->setPolicyObject($task);
     $priority_name = ManiphestTaskPriority::getTaskPriorityName($task->getPriority());
     $priority_color = ManiphestTaskPriority::getTaskPriorityColor($task->getPriority());
     $status = $task->getStatus();
     $status_name = ManiphestTaskStatus::renderFullDescription($status, $priority_name, $priority_color);
     $view->addProperty(PHUIHeaderView::PROPERTY_STATUS, $status_name);
     $view->setHeaderIcon(ManiphestTaskStatus::getStatusIcon($task->getStatus()) . ' ' . $priority_color);
     if (ManiphestTaskPoints::getIsEnabled()) {
         $points = $task->getPoints();
         if ($points !== null) {
             $points_name = pht('%s %s', $task->getPoints(), ManiphestTaskPoints::getPointsLabel());
             $tag = id(new PHUITagView())->setName($points_name)->setShade('blue')->setType(PHUITagView::TYPE_SHADE);
             $view->addTag($tag);
         }
     }
     return $view;
 }
开发者ID:rchicoli,项目名称:phabricator,代码行数:19,代码来源:ManiphestTaskDetailController.php

示例4: buildTaskInfoDictionaries

 protected function buildTaskInfoDictionaries(array $tasks)
 {
     assert_instances_of($tasks, 'ManiphestTask');
     if (!$tasks) {
         return array();
     }
     $task_phids = mpull($tasks, 'getPHID');
     $all_deps = id(new PhabricatorEdgeQuery())->withSourcePHIDs($task_phids)->withEdgeTypes(array(ManiphestTaskDependsOnTaskEdgeType::EDGECONST));
     $all_deps->execute();
     $result = array();
     foreach ($tasks as $task) {
         // TODO: Batch this get as CustomField gets cleaned up.
         $field_list = PhabricatorCustomField::getObjectFields($task, PhabricatorCustomField::ROLE_EDIT);
         $field_list->readFieldsFromStorage($task);
         $auxiliary = mpull($field_list->getFields(), 'getValueForStorage', 'getFieldKey');
         $task_deps = $all_deps->getDestinationPHIDs(array($task->getPHID()), array(ManiphestTaskDependsOnTaskEdgeType::EDGECONST));
         $result[$task->getPHID()] = array('id' => $task->getID(), 'phid' => $task->getPHID(), 'authorPHID' => $task->getAuthorPHID(), 'ownerPHID' => $task->getOwnerPHID(), 'ccPHIDs' => $task->getSubscriberPHIDs(), 'status' => $task->getStatus(), 'statusName' => ManiphestTaskStatus::getTaskStatusName($task->getStatus()), 'isClosed' => $task->isClosed(), 'priority' => ManiphestTaskPriority::getTaskPriorityName($task->getPriority()), 'priorityColor' => ManiphestTaskPriority::getTaskPriorityColor($task->getPriority()), 'title' => $task->getTitle(), 'description' => $task->getDescription(), 'projectPHIDs' => $task->getProjectPHIDs(), 'uri' => PhabricatorEnv::getProductionURI('/T' . $task->getID()), 'auxiliary' => $auxiliary, 'objectName' => 'T' . $task->getID(), 'dateCreated' => $task->getDateCreated(), 'dateModified' => $task->getDateModified(), 'dependsOnTaskPHIDs' => $task_deps);
     }
     return $result;
 }
开发者ID:rchicoli,项目名称:phabricator,代码行数:20,代码来源:ManiphestConduitAPIMethod.php

示例5: getFieldValuesForConduit

 public function getFieldValuesForConduit()
 {
     $status_value = $this->getStatus();
     $status_info = array('value' => $status_value, 'name' => ManiphestTaskStatus::getTaskStatusName($status_value), 'color' => ManiphestTaskStatus::getStatusColor($status_value));
     $priority_value = (int) $this->getPriority();
     $priority_info = array('value' => $priority_value, 'subpriority' => (double) $this->getSubpriority(), 'name' => ManiphestTaskPriority::getTaskPriorityName($priority_value), 'color' => ManiphestTaskPriority::getTaskPriorityColor($priority_value));
     return array('name' => $this->getTitle(), 'authorPHID' => $this->getAuthorPHID(), 'ownerPHID' => $this->getOwnerPHID(), 'status' => $status_info, 'priority' => $priority_info);
 }
开发者ID:phpengineer,项目名称:phabricator,代码行数:8,代码来源:ManiphestTask.php


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