Exemplo n.º 1
0
 public function __construct()
 {
     parent::__construct();
     $me = $this;
     $this->add(new Link('home', function () use($me) {
         $this->setPage(Identifier::forName($me->getApplication()->getHomePage()));
     }));
 }
Exemplo n.º 2
0
 public function __construct()
 {
     parent::__construct();
     $self = $this;
     $this->add(new Link('home', function () use($self) {
         $self->setPage(HomePage::getIdentifier());
     }));
     $files = array('index.php', 'assets/AbstractPage.php', 'assets/AbstractPage.html', 'assets/SamplePageClassAuthorisationStrategy.php');
     $files = array_merge($files, $this->getInvolvedFiles());
     $sourceLink = new Link('source', function () use($self, $files) {
         $self->setPage(new SourcePage($files));
     });
     $sourceLink->setPopupSettings(new \picon\PopupSettings('Source Code', '900px', '600px'));
     $this->add($sourceLink);
 }
Exemplo n.º 3
0
 public function __construct($files)
 {
     parent::__construct();
     $self = $this;
     $this->add(new picon\ListView('files', function (\picon\ListItem $item) use($self) {
         $link = new \picon\AjaxLink('link', function (picon\AjaxRequestTarget $target) use($item, $self) {
             $target->add($self->getPanel());
             $newPanel = new CodeOutputPanel('code', $item->getModelObject());
             $newPanel->setOutputMarkupId(true);
             $self->getPanel()->addOrReplace($newPanel);
         });
         $item->add($link);
         $link->add(new picon\Label('fileName', $item->getModel()));
     }, new picon\ArrayModel($files)));
     $this->panel = new picon\MarkupContainer('wrapper');
     $this->add($this->panel);
     $this->panel->setOutputMarkupId(true);
     $this->panel->add(new CodeOutputPanel('code', $files[0]));
 }