Changeset View
Changeset View
Standalone View
Standalone View
src/applications/config/option/PhabricatorConfigOption.php
Show First 20 Lines • Show All 199 Lines • ▼ Show 20 Lines | final class PhabricatorConfigOption | ||||
public function setCustomData($data) { | public function setCustomData($data) { | ||||
$this->customData = $data; | $this->customData = $data; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function newDescriptionRemarkupView(PhabricatorUser $viewer) { | public function newDescriptionRemarkupView(PhabricatorUser $viewer) { | ||||
$description = $this->getDescription(); | $description = $this->getDescription(); | ||||
if (!strlen($description)) { | if (!phutil_nonempty_string($description)) { | ||||
return null; | return null; | ||||
} | } | ||||
return new PHUIRemarkupView($viewer, $description); | return new PHUIRemarkupView($viewer, $description); | ||||
valerio.bozzolan: ✅ Note that `$description` must be a string (and not some fancy string builders) since the… | |||||
} | } | ||||
} | } |
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
✅ Note that $description must be a string (and not some fancy string builders) since the example declared in PHUIRemarkupView.php is