public function __construct() { parent::__construct(); $columns = array(); $columns[] = new picon\PropertyColumn('Sample Value', 'value'); $provider = new SampleDataProvider(); $this->add(new \picon\DefaultDataTable('table', $provider, $columns)); }
public function __construct() { parent::__construct(); $self = $this; $this->add(new Link('login', function () use($self) { $_SESSION['auth'] = true; $self->setPage(HomePage::getIdentifier()); })); }
function __construct() { global $USER; parent::__construct(); $this->hasAlliance = $USER['ally_id'] != 0; $this->hasApply = $this->isApply(); if ($this->hasAlliance && !$this->hasApply) { $this->setAllianceData($USER['ally_id']); } }
public function __construct() { parent::__construct(); $this->domain = new ExampleDomain(); $this->setModel(new CompoundPropertyModel($this, 'domain')); $feedback = new FeedbackPanel('feedback'); $this->add($feedback); $form = new Form('form'); $this->add($form); $self = $this; $form->add(new Button('button', function () use($self) { $self->info('First button pressed, valid form'); }, function () use($self) { $self->info('First button pressed, invalid form'); })); $form->add(new Button('button2', function () use($self) { $self->info('Second button pressed, valid form'); }, function () use($self) { $self->info('Second button pressed, invalid form'); })); $submitedInfo = new MarkupContainer('submitedInfo'); $this->add($submitedInfo); $choices = array('default', 'option', 'other option', 'something else'); $form->add(new TextField('textBox')); $form->add(new TextArea('textArea')); $form->add(new DropDown('select', $choices)); $group = new RadioGroup('rgroup'); $form->add($group); $group->add(new Radio('gradio1', new BasicModel('option1'))); $group->add(new Radio('gradio2', new BasicModel('option2'))); $form->add(new CheckBox('icheck')); $checkGroup = new CheckBoxGroup('cgroup'); $form->add($checkGroup); $checkGroup->add(new Check('check1', new BasicModel('option1'))); $checkGroup->add(new Check('check2', new BasicModel('option2'))); $form->add(new RadioChoice('rchoice', $choices)); $form->add(new CheckChoice('cchoice', $choices)); $form->add(new ListMultiple('mchoice', $choices)); $submitedInfo->add(new Label('textBox')); $submitedInfo->add(new Label('textArea')); $submitedInfo->add(new Label('select')); $submitedInfo->add(new Label('rgroup')); $submitedInfo->add(new Label('icheck')); $submitedInfo->add(new ListView('cgroup', function (&$item) { $item->add(new picon\Label('value', $item->getModel())); })); $submitedInfo->add(new Label('rchoice')); $submitedInfo->add(new ListView('cchoice', function (&$item) { $item->add(new picon\Label('value', $item->getModel())); })); $submitedInfo->add(new ListView('mchoice', function (&$item) { $item->add(new picon\Label('value', $item->getModel())); })); }
public function __construct() { parent::__construct(); $collection = new picon\TabCollection(); $collection->addTab('One', function ($id) { return new TabOnePanel($id); }); $collection->addTab('Two', function ($id) { return new TabTwoPanel($id); }); $this->add(new picon\TabPanel('tabs', $collection)); }
public function __construct($key, $title, $parent = null) { parent::__construct($key, $title, $parent); add_action('wp_ajax_' . $this->get_ajax_action(), function () { $this->_ajax_action(); }); if (is_admin() && isset($_REQUEST['page']) && $_REQUEST['page'] == $this->_key && isset($_POST) && !empty($_POST)) { add_action('init', function () { $this->_post_action(); }); } }
public function __construct(AbstractModel $model, array $config) { parent::__construct($model, $config); if (array_key_exists('description', $this->config)) { Head::getInstance()->addOg('description', $this->config['description']); } if (!array_key_exists('subtitle', $this->config) || $this->config['subtitle']) { $title = Config::getInstance()->title . ' - ' . $this->config['name']; Head::getInstance()->addOg('title', $title); Head::getInstance()->setTitle($title); } }
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()); })); }
public function __construct() { parent::__construct(); $label = new picon\Label('text', new picon\PropertyModel($this, 'text')); $label->setOutputMarkupId(true); $this->add($label); $self = $this; $this->add(new \picon\AjaxLink('alterLink', function (picon\AjaxRequestTarget $target) use($self, $label) { $self->text = 'Update in callback text'; $target->add($label); })); }
public function __construct() { $id = Util::getRequest('id'); if ($id == null || intval($id) != $id) { Util::redirect('?missing_id'); } // Hash auslesen $results = RoItem::getObjects(array('i.id' => $id), array('to' => 1), "i.online ASC, i.item_id ASC, i.price_one ASC"); if ($results == null || is_array($results) == false || count($results) == 0) { Util::redirect('?hash_not_found'); } $this->item = current($results); $this->item->loadHits(); parent::__construct(); }
public function __construct() { parent::__construct(); $fruit = array('apples', 'pears', 'bananas', 'oranges'); $this->add(new ListView('fruit', function ($entry) { $entry->add(new Label('name', new BasicModel($entry->getModelObject()))); }, new ArrayModel($fruit))); $repeatingView = new \picon\RepeatingView('repeater'); $this->add($repeatingView); foreach ($fruit as $item) { $element = new Label('text', new BasicModel($item)); $container = new picon\MarkupContainer($repeatingView->getNextChildId()); $container->add($element); $repeatingView->add($container); } }
function __construct() { parent::__construct(); $action = HTTP::_GP('action', ''); switch ($action) { case 'success': $this->IPN(); break; case 'cancel': $this->Cancel(); break; case 'ipn': $this->IPN(); break; default: $this->CallOrder(); break; } }
public function __construct() { parent::__construct(); $layoutExamples = array(); $layoutExamples[] = new Example('Markup Inheretence', MarkupInheritancePage::getIdentifier()); $layoutExamples[] = new Example('Panels', PanelPage::getIdentifier()); $layoutExamples[] = new Example('Borders', BorderPage::getIdentifier()); $generalExamples = array(); $generalExamples[] = new Example('Labels', LabelPage::getIdentifier()); $generalExamples[] = new Example('Links', LinkPage::getIdentifier()); $generalExamples[] = new Example('Lists', ListPage::getIdentifier()); $generalExamples[] = new Example('Tabs', TabPanelPage::getIdentifier()); $formExamples = array(); $formExamples[] = new Example('Form Fields', FormPage::getIdentifier()); $formExamples[] = new Example('Validation', ValidationPage::getIdentifier()); $formExamples[] = new Example('Special Fields', SpecialFields::getIdentifier()); $tableExamples = array(); $tableExamples[] = new Example('Data Table', DataTablePage::getIdentifier()); $ajaxExamples = array(); $ajaxExamples[] = new Example('Ajax Link', AjaxLinkPage::getIdentifier()); $ajaxExamples[] = new Example('Ajax Button', AjaxButtonPage::getIdentifier()); $authoExamples[] = new Example('Authorised Access Page', AuthorisedPage::getIdentifier()); $examples = array(); $examples[] = new ExampleType('General', $generalExamples); $examples[] = new ExampleType('Layout', $layoutExamples); $examples[] = new ExampleType('Form Components', $formExamples); $examples[] = new ExampleType('Data Tables', $tableExamples); $examples[] = new ExampleType('Ajax', $ajaxExamples); $examples[] = new ExampleType('Security', $authoExamples); $self = $this; $this->add(new ListView('examples', function (picon\ListItem $item) use($self) { $type = $item->getModelObject(); $item->add(new picon\Label('title', new picon\BasicModel($type->name))); $item->add(new ListView('list', function (picon\ListItem $item) use($self) { $link = new picon\Link('link', function () use($item, $self) { $self->setPage($item->getModelObject()->page); }); $item->add($link); $link->add(new picon\Label('exampleName', new picon\BasicModel($item->getModelObject()->name))); }, new picon\ArrayModel($type->examples))); }, new ArrayModel($examples))); }
public function __construct() { parent::__construct(); $feedback = new \picon\FeedbackPanel('feedback'); $feedback->setOutputMarkupId(true); $this->add($feedback); $label = new picon\Label('text', new picon\PropertyModel($this, 'text')); $label->setOutputMarkupId(true); $this->add($label); $form = new picon\Form('form'); $this->add($form); $form->add(new picon\RequiredTextField('text', new picon\PropertyModel($this, 'text'))); $self = $this; $form->add(new \picon\AjaxButton('button', function (picon\AjaxRequestTarget $target) use($label, $feedback) { $target->add($label); $target->add($feedback); }, function (picon\AjaxRequestTarget $target) use($feedback) { $target->add($feedback); })); }
public function __construct() { parent::__construct(); $feedback = new picon\FeedbackPanel('feedback'); $this->add($feedback); $form = new \picon\Form('form'); $form->add(new \picon\DateField('date', new \picon\PropertyModel($this, 'date'))); $feedback->setOutputMarkupId(true); $this->add($form); $model = new \picon\FileModel(); $form->add(new \picon\FileUploadField('file', $model)); $self = $this; $form->add(new picon\Button('button', function () use($model, $self) { $self->success(sprintf("The file was uploaded successfully. Name: %s, size: %d", $model->getName(), $model->getSize())); $self->success(sprintf('Date was: %s', $self->date)); })); $form->add(new picon\AjaxButton('ajaxbutton', function (picon\AjaxRequestTarget $target) use($feedback, $model, $self) { $self->success(sprintf("The file was uploaded successfully. Name: %s, size: %d", $model->getName(), $model->getSize())); $self->success(sprintf('Date was: %s', $self->date)); $target->add($feedback); })); }
public function __construct() { parent::__construct(); $this->add(new \picon\FeedbackPanel('feedback')); $form = new picon\Form('form'); $this->add($form); $self = $this; $form->add(new picon\Button('button', function () use($self) { $self->info('The form validation passed'); }, function () use($self) { $self->info('The form was invalid'); })); $email = new picon\RequiredTextField('email'); $email->add(new picon\EmailAddressValidator()); $form->add($email); $maxNumber = new picon\RequiredTextField('maxNumber'); $maxNumber->add(new \picon\MaximumValidator(14)); $form->add($maxNumber); $minNumber = new picon\RequiredTextField('minNumber'); $minNumber->add(new picon\MinimumValidator(34)); $form->add($minNumber); $rangeNumber = new picon\RequiredTextField('rangeNumber'); $rangeNumber->add(new \picon\RangeValidator(4, 45)); $form->add($rangeNumber); $maxString = new picon\RequiredTextField('maxString'); $maxString->add(new \picon\MaximumLengthValidator(10)); $form->add($maxString); $minString = new picon\RequiredTextField('minString'); $minString->add(new picon\MinimumLengthValidator(4)); $form->add($minString); $rangeString = new picon\RequiredTextField('rangeString'); $rangeString->add(new \picon\RangeLengthValidator(4, 10)); $form->add($rangeString); $textArea = new picon\TextArea('textArea'); $textArea->setRequired(true); $form->add($textArea); }
function __construct() { parent::__construct(); $this->setWindow('light'); }
function __construct() { parent::__construct(); require 'includes/classes/class.SupportTickets.php'; $this->ticketObj = new SupportTickets(); }
public function __construct() { parent::__construct(); $this->add(new SampleBorder('border')); }
function __construct() { parent::__construct(); $this->setWindow('ajax'); }
public function __construct(AbstractModel $model, $config) { parent::__construct($model, $config); }
public function __construct() { parent::__construct(); $this->add(new picon\Label('text', new picon\PropertyModel($this, 'text'))); }
function __construct() { parent::__construct(); $this->setWindow('popup'); $this->initTemplate(); }
function __construct() { parent::__construct(); $this->initTemplate(); }
function __construct() { parent::__construct(); }
public function __construct() { parent::__construct(); $this->add(new SamplePanel('panel')); }