Changeset View
Changeset View
Standalone View
Standalone View
src/view/phui/PHUIObjectItemView.php
Show First 20 Lines • Show All 868 Lines • ▼ Show 20 Lines | private function renderStatusIcon($icon, $label) { | ||||
$icon = id(new PHUIIconView()) | $icon = id(new PHUIIconView()) | ||||
->setIcon($icon); | ->setIcon($icon); | ||||
$options = array( | $options = array( | ||||
'class' => 'phui-oi-status-icon', | 'class' => 'phui-oi-status-icon', | ||||
); | ); | ||||
if (strlen($label)) { | if (phutil_nonempty_string($label)) { | ||||
valerio.bozzolan: ✅ I logged the value of `$label` in 50+ pages and its domain seems to be always NULL or a… | |||||
$options['sigil'] = 'has-tooltip'; | $options['sigil'] = 'has-tooltip'; | ||||
$options['meta'] = array('tip' => $label, 'size' => 300); | $options['meta'] = array('tip' => $label, 'size' => 300); | ||||
} | } | ||||
return javelin_tag('div', $options, $icon); | return javelin_tag('div', $options, $icon); | ||||
} | } | ||||
Show All 17 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 logged the value of $label in 50+ pages and its domain seems to be always NULL or a string. Alien values will be reported by phutil_nonempty_string() and that is OK.