[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class JavelinReactorExample extends PhabricatorUIExample { 4 5 public function getName() { 6 return 'Javelin Reactor'; 7 } 8 9 public function getDescription() { 10 return 'Lots of code'; 11 } 12 13 public function renderExample() { 14 $rows = array(); 15 16 $examples = array( 17 array( 18 'Reactive button only generates a stream of events', 19 'ReactorButtonExample', 20 'phabricator-uiexample-reactor-button', 21 array(), 22 ), 23 array( 24 'Reactive checkbox generates a boolean dynamic value', 25 'ReactorCheckboxExample', 26 'phabricator-uiexample-reactor-checkbox', 27 array('checked' => true), 28 ), 29 array( 30 'Reactive focus detector generates a boolean dynamic value', 31 'ReactorFocusExample', 32 'phabricator-uiexample-reactor-focus', 33 array(), 34 ), 35 array( 36 'Reactive input box, with normal and calmed output', 37 'ReactorInputExample', 38 'phabricator-uiexample-reactor-input', 39 array('init' => 'Initial value'), 40 ), 41 array( 42 'Reactive mouseover detector generates a boolean dynamic value', 43 'ReactorMouseoverExample', 44 'phabricator-uiexample-reactor-mouseover', 45 array(), 46 ), 47 array( 48 'Reactive radio buttons generate a string dynamic value', 49 'ReactorRadioExample', 50 'phabricator-uiexample-reactor-radio', 51 array(), 52 ), 53 array( 54 'Reactive select box generates a string dynamic value', 55 'ReactorSelectExample', 56 'phabricator-uiexample-reactor-select', 57 array(), 58 ), 59 array( 60 'sendclass makes the class of an element a string dynamic value', 61 'ReactorSendClassExample', 62 'phabricator-uiexample-reactor-sendclass', 63 array(), 64 ), 65 array( 66 'sendproperties makes some properties of an object into dynamic values', 67 'ReactorSendPropertiesExample', 68 'phabricator-uiexample-reactor-sendproperties', 69 array(), 70 ), 71 ); 72 73 foreach ($examples as $example) { 74 list($desc, $name, $resource, $params) = $example; 75 $template = new AphrontJavelinView(); 76 $template 77 ->setName($name) 78 ->setParameters($params) 79 ->setCelerityResource($resource); 80 $rows[] = array($desc, $template->render()); 81 } 82 83 $table = new AphrontTableView($rows); 84 85 $panel = new AphrontPanelView(); 86 $panel->appendChild($table); 87 88 return $panel; 89 } 90 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |