[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/applications/uiexample/examples/ -> JavelinViewExample.php (source)

   1  <?php
   2  
   3  final class JavelinViewExample extends PhabricatorUIExample {
   4  
   5    public function getName() {
   6      return 'Javelin Views';
   7    }
   8  
   9    public function getDescription() {
  10      return 'Mix and match client and server views.';
  11    }
  12  
  13    public function renderExample() {
  14  
  15      $request = $this->getRequest();
  16  
  17      $init = $request->getStr('init');
  18  
  19      $parent_server_template = new JavelinViewExampleServerView();
  20  
  21      $parent_client_template = new AphrontJavelinView();
  22      $parent_client_template
  23        ->setName('JavelinViewExample')
  24        ->setCelerityResource('phabricator-uiexample-javelin-view');
  25  
  26      $child_server_template = new JavelinViewExampleServerView();
  27  
  28      $child_client_template = new AphrontJavelinView();
  29      $child_client_template
  30        ->setName('JavelinViewExample')
  31        ->setCelerityResource('phabricator-uiexample-javelin-view');
  32  
  33      $parent_server_template->appendChild($parent_client_template);
  34      $parent_client_template->appendChild($child_server_template);
  35      $child_server_template->appendChild($child_client_template);
  36      $child_client_template->appendChild('Hey, it worked.');
  37  
  38      $panel = new AphrontPanelView();
  39      $panel->appendChild($parent_server_template);
  40  
  41      return $panel;
  42    }
  43  }


Generated: Sun Nov 30 09:20:46 2014 Cross-referenced by PHPXref 0.7.1