Exemplo n.º 1
0
 public function __construct()
 {
     parent::__construct();
     $self = $this;
     $this->add(new picon\Link('link', function () use($self) {
         $_SESSION['auth'] = false;
         $self->setPage(HomePage::getIdentifier());
     }));
 }
Exemplo n.º 2
0
 public function __construct()
 {
     parent::__construct();
     $this->add(new picon\Label('text', new picon\PropertyModel($this, 'text')));
     $self = $this;
     $this->add(new \picon\Link('alterLink', function () use($self) {
         $self->text = 'Update in callback text';
     }));
     $this->add(new \picon\Link('pageLink', function () use($self) {
         $self->setPage(HomePage::getIdentifier());
     }));
 }
Exemplo n.º 3
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);
 }