[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/applications/differential/customfield/ -> DifferentialArcanistProjectField.php (source)

   1  <?php
   2  
   3  final class DifferentialArcanistProjectField
   4    extends DifferentialCustomField {
   5  
   6    public function getFieldKey() {
   7      return 'differential:arcanist-project';
   8    }
   9  
  10    public function getFieldName() {
  11      return pht('Arcanist Project');
  12    }
  13  
  14    public function getFieldDescription() {
  15      return pht('Shows arcanist project name.');
  16    }
  17  
  18    public function shouldAppearInPropertyView() {
  19      return true;
  20    }
  21  
  22    public function renderPropertyViewLabel() {
  23      return $this->getFieldName();
  24    }
  25  
  26    public function getRequiredHandlePHIDsForPropertyView() {
  27      $phid = $this->getArcanistProjectPHID();
  28      if ($phid) {
  29        return array($phid);
  30      }
  31      return array();
  32    }
  33  
  34    public function renderPropertyViewValue(array $handles) {
  35      return $this->renderHandleList($handles);
  36    }
  37  
  38    private function getArcanistProjectPHID() {
  39      return $this->getObject()->getActiveDiff()->getArcanistProjectPHID();
  40    }
  41  
  42  }


Generated: Sun Nov 30 09:20:46 2014 Cross-referenced by PHPXref 0.7.1