Differential D25078 Diff 361 src/applications/project/trigger/PhabricatorProjectTriggerInvalidRule.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/project/trigger/PhabricatorProjectTriggerInvalidRule.php
Show All 40 Lines | final class PhabricatorProjectTriggerInvalidRule | ||||
} | } | ||||
protected function newInvalidView() { | protected function newInvalidView() { | ||||
return array( | return array( | ||||
id(new PHUIIconView()) | id(new PHUIIconView()) | ||||
->setIcon('fa-exclamation-triangle red'), | ->setIcon('fa-exclamation-triangle red'), | ||||
' ', | ' ', | ||||
pht( | pht( | ||||
'This is a trigger rule with a valid type ("%s") but an invalid '. | 'This is a Trigger Rule with a valid type ("%s") but an invalid '. | ||||
'value.', | 'value.', | ||||
$this->getRecord()->getType()), | $this->getRecord()->getType()), | ||||
); | ); | ||||
} | } | ||||
protected function getDefaultValue() { | protected function getDefaultValue() { | ||||
return null; | return null; | ||||
} | } | ||||
Show All 12 Lines | final class PhabricatorProjectTriggerInvalidRule | ||||
public function getRuleViewDescription($value) { | public function getRuleViewDescription($value) { | ||||
$record = $this->getRecord(); | $record = $this->getRecord(); | ||||
$type = $record->getType(); | $type = $record->getType(); | ||||
$exception = $this->getException(); | $exception = $this->getException(); | ||||
if ($exception) { | if ($exception) { | ||||
return pht( | return pht( | ||||
'This rule (of type "%s") is invalid: %s', | 'This Rule (of type "%s") is invalid: %s', | ||||
$type, | $type, | ||||
$exception->getMessage()); | $exception->getMessage()); | ||||
} else { | } else { | ||||
return pht( | return pht( | ||||
'This rule (of type "%s") is invalid.', | 'This Rule (of type "%s") is invalid.', | ||||
$type); | $type); | ||||
} | } | ||||
} | } | ||||
public function getRuleViewIcon($value) { | public function getRuleViewIcon($value) { | ||||
return id(new PHUIIconView()) | return id(new PHUIIconView()) | ||||
->setIcon('fa-exclamation-triangle', 'red'); | ->setIcon('fa-exclamation-triangle', 'red'); | ||||
} | } | ||||
} | } |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0