Differential D13200 Diff 31965 src/applications/uiexample/examples/PhabricatorAphrontBarUIExample.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/uiexample/examples/PhabricatorAphrontBarUIExample.php
| Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | foreach ($indices as $index) { | ||||
| ->setNumGlyphs(5) | ->setNumGlyphs(5) | ||||
| ->setCaption("Lol score is {$index}/{$max}") | ->setCaption("Lol score is {$index}/{$max}") | ||||
| ->setGlyph(hsprintf('%s', 'LOL!')) | ->setGlyph(hsprintf('%s', 'LOL!')) | ||||
| ->setBackgroundGlyph(hsprintf('%s', '____')); | ->setBackgroundGlyph(hsprintf('%s', '____')); | ||||
| $views[] = hsprintf('<div style="clear:both;"></div>'); | $views[] = hsprintf('<div style="clear:both;"></div>'); | ||||
| } | } | ||||
| return $this->wrap( | return $this->wrap( | ||||
| 'Glyph bars in weird order', | pht('Glyph bars in weird order'), | ||||
| $views); | $views); | ||||
| } | } | ||||
| private function renderAsciiStarBar() { | private function renderAsciiStarBar() { | ||||
| $bar = id(new AphrontGlyphBarView()) | $bar = id(new AphrontGlyphBarView()) | ||||
| ->setValue(50) | ->setValue(50) | ||||
| ->setMax(100) | ->setMax(100) | ||||
| ->setCaption('Glyphs!') | ->setCaption(pht('Glyphs!')) | ||||
| ->setNumGlyphs(10) | ->setNumGlyphs(10) | ||||
| ->setGlyph(hsprintf('%s', '*')); | ->setGlyph(hsprintf('%s', '*')); | ||||
| return $this->wrap( | return $this->wrap( | ||||
| 'Ascii star glyph bar', $bar); | pht('ASCII star glyph bar'), | ||||
| $bar); | |||||
| } | } | ||||
| } | } | ||||