当前位置: 首页>>代码示例>>PHP>>正文


PHP AbstractPage::__construct方法代码示例

本文整理汇总了PHP中AbstractPage::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP AbstractPage::__construct方法的具体用法?PHP AbstractPage::__construct怎么用?PHP AbstractPage::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AbstractPage的用法示例。


在下文中一共展示了AbstractPage::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 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));
 }
开发者ID:picon,项目名称:picon-framework,代码行数:8,代码来源:DataTablePage.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     $self = $this;
     $this->add(new Link('login', function () use($self) {
         $_SESSION['auth'] = true;
         $self->setPage(HomePage::getIdentifier());
     }));
 }
开发者ID:picon,项目名称:picon-framework,代码行数:9,代码来源:LoginPage.php

示例3:

 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']);
     }
 }
开发者ID:fuding,项目名称:Antaris,代码行数:10,代码来源:class.ShowAlliancePage.php

示例4: __construct

 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()));
     }));
 }
开发者ID:picon,项目名称:picon-framework,代码行数:54,代码来源:FormPage.php

示例5: __construct

 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));
 }
开发者ID:picon,项目名称:picon-framework,代码行数:12,代码来源:TabPanelPage.php

示例6: __construct

 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();
         });
     }
 }
开发者ID:redink-no,项目名称:wpkit,代码行数:12,代码来源:CustomPage.php

示例7: __construct

 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);
     }
 }
开发者ID:phgamper,项目名称:markdown_blog,代码行数:12,代码来源:View.php

示例8: __construct

 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());
     }));
 }
开发者ID:picon,项目名称:picon-framework,代码行数:12,代码来源:LinkPage.php

示例9: __construct

 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);
     }));
 }
开发者ID:picon,项目名称:picon-framework,代码行数:12,代码来源:AjaxLinkPage.php

示例10: __construct

 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();
 }
开发者ID:GodLesZ,项目名称:svn-dump,代码行数:15,代码来源:detail.page.php

示例11: __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);
     }
 }
开发者ID:picon,项目名称:picon-framework,代码行数:16,代码来源:ListPage.php

示例12: switch

 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;
     }
 }
开发者ID:fuding,项目名称:Antaris,代码行数:19,代码来源:class.ShowPaypalPage.php

示例13: __construct

 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)));
 }
开发者ID:picon,项目名称:picon-framework,代码行数:42,代码来源:HomePage.php

示例14: __construct

 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);
     }));
 }
开发者ID:picon,项目名称:picon-framework,代码行数:20,代码来源:AjaxButtonPage.php

示例15: __construct

 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);
     }));
 }
开发者ID:picon,项目名称:picon-framework,代码行数:22,代码来源:SpecialFields.php


注:本文中的AbstractPage::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。