public function renderForDisplay(PhabricatorUser $viewer)
 {
     try {
         $target = $this->loadBuildTarget();
     } catch (Exception $ex) {
         return null;
     }
     return $viewer->renderHandle($target->getPHID());
 }
Esempio n. 2
0
 public function renderConditionValue(PhabricatorUser $viewer, $value)
 {
     // TODO: While this is less of a mess than it used to be, it would still
     // be nice to push this down into individual fields better eventually and
     // stop guessing which values are PHIDs and which aren't.
     if (!is_array($value)) {
         return $value;
     }
     $type_unknown = PhabricatorPHIDConstants::PHID_TYPE_UNKNOWN;
     foreach ($value as $key => $val) {
         if (is_string($val)) {
             if (phid_get_type($val) !== $type_unknown) {
                 $value[$key] = $viewer->renderHandle($val);
             }
         }
     }
     return phutil_implode_html(', ', $value);
 }
 public function renderArtifactSummary(PhabricatorUser $viewer)
 {
     $artifact = $this->getBuildArtifact();
     $file_phid = $artifact->getProperty('drydockLeasePHID');
     return $viewer->renderHandle($file_phid);
 }
 public function getDisplayDescription(PhabricatorUser $viewer, PhabricatorCalendarImportLog $log)
 {
     return $viewer->renderHandle($log->getParameter('file.phid'));
 }
 public function getDisplayDescription(PhabricatorUser $viewer, PhabricatorCalendarImportLog $log)
 {
     $event_phid = $log->getParameter('phid');
     return $viewer->renderHandle($event_phid);
 }
 public function appendImportProperties(PhabricatorUser $viewer, PhabricatorCalendarImport $import, PHUIPropertyListView $properties)
 {
     $phid_key = PhabricatorCalendarImportICSFileTransaction::PARAMKEY_FILE;
     $file_phid = $import->getParameter($phid_key);
     $properties->addProperty(pht('Source File'), $viewer->renderHandle($file_phid));
 }
 public function getDisplayDescription(PhabricatorUser $viewer, PhabricatorCalendarImportLog $log)
 {
     $phid = $log->getParameter('phid');
     return pht('Ignored an event (%s) because the original version of this event ' . 'was created here.', $viewer->renderHandle($phid));
 }