Changeset View
Changeset View
Standalone View
Standalone View
src/view/layout/AphrontSideNavFilterView.php
Show First 20 Lines • Show All 91 Lines • ▼ Show 20 Lines | public function newLink($key) { | ||||
return $this->getMenuView()->getItem($key); | return $this->getMenuView()->getItem($key); | ||||
} | } | ||||
private function addThing($key, $name, $uri, $type, $icon = null) { | private function addThing($key, $name, $uri, $type, $icon = null) { | ||||
$item = id(new PHUIListItemView()) | $item = id(new PHUIListItemView()) | ||||
->setName($name) | ->setName($name) | ||||
->setType($type); | ->setType($type); | ||||
if (strlen($icon)) { | if (phutil_nonempty_string($icon)) { | ||||
valerio.bozzolan: ✅ I tested with `phlog()` and it seems `$item` is just the string name of Font Awesome icon, or… | |||||
$item->setIcon($icon); | $item->setIcon($icon); | ||||
} | } | ||||
if (strlen($key)) { | if (strlen($key)) { | ||||
$item->setKey($key); | $item->setKey($key); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 164 Lines • Show Last 20 Lines |
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
✅ I tested with phlog() and it seems $item is just the string name of Font Awesome icon, or null.
The phutil_nonempty_string() will report alien values and that is OK.