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


PHP Presenter::startup方法代码示例

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


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

示例1: startup

 protected function startup()
 {
     parent::startup();
     if ($this->user->isLoggedIn() && $this->action != 'out') {
         $this->redirect(':Admin:Homepage:');
     }
 }
开发者ID:joseki,项目名称:sandbox,代码行数:7,代码来源:SignPresenter.php

示例2: startup

 public function startup()
 {
     parent::startup();
     $this->template->registerHelper('fshl_highlighter', array($this, 'fshl_highlighter'));
     $this->template->registerHelper('ansi_console_colors', array($this, 'ansi_console_colors'));
     $this->template->registerHelper('wordwrap', 'wordwrap');
 }
开发者ID:Edke,项目名称:PerfORM-Console,代码行数:7,代码来源:BasePresenter.php

示例3: startup

 public function startup()
 {
     parent::startup();
     $this->loadBlackboard();
     $this->loadBlock(function () {
         $block = $this->blackboard->getRandomParent();
         if ($block) {
             $this->redirectToEntity($this->blackboard, $block);
         }
     });
     $this->loadSchema(function () {
         if (!$this->block) {
             return NULL;
         }
         $schema = $this->block->getRandomParent();
         if ($schema) {
             $this->redirectToEntity($this->blackboard, $this->block, $schema);
         }
     });
     if ($this->block && !$this->block->contains($this->blackboard)) {
         $this->redirectToEntity($this->blackboard);
     }
     if ($this->block && $this->schema && !$this->schema->contains($this->block)) {
         $this->redirectToEntity($this->blackboard);
     }
     $this->checkSlug($this->blackboard);
 }
开发者ID:VasekPurchart,项目名称:khanovaskola-v3,代码行数:27,代码来源:Blackboard.php

示例4: startup

 protected function startup()
 {
     if (!$this->lang) {
         $this->lang = 'sk';
     }
     // not calling parent::startup to avoid redirection to Homepage
     Presenter::startup();
     //		parent::startup();
 }
开发者ID:radypala,项目名称:maga-website,代码行数:9,代码来源:ErrorPresenter.php

示例5: startup

 public function startup()
 {
     //$this->oldLayoutMode = false;
     //$this->oldModuleMode = false;
     parent::startup();
     $application = Environment::getApplication();
     if (!isset($this->lang)) {
         $this->lang = $this->getHttpRequest()->detectLanguage(array('en', 'sk'));
         $this->canonicalize();
     }
     $this->translator = new Translator($this->lang);
     $this->template->setTranslator($this->translator);
     $modul = explode(':', $this->getName());
     $this->module = $modul[0];
     $this->template->module = $this->module;
 }
开发者ID:bazo,项目名称:diplomovka,代码行数:16,代码来源:BasePresenter.php

示例6: startup

 * @package    FrontModule
 */
class Front_BasePresenter extends Presenter
{
    public $pathToTheme, $viewTemplatePath, $presenterTemplatePath;
    protected $themesDir = 'themes';
    protected $data;
    /** @persistent */
    public $lang;
    private $translator;
    public function startup()
    {
        parent::startup();
        //$application = Environment::getApplication();
        if (!isset($this->lang)) {
            $this->lang = $this->getHttpRequest()->detectLanguage(array('en', 'sk'));
            $this->canonicalize();
开发者ID:bazo,项目名称:Mokuji,代码行数:17,代码来源:FrontBasePresenter.php

示例7: startup

 protected function startup()
 {
     parent::startup();
     // block Internet Explorer browser itself (force to use Google Chrome Frame)
     //		$this->blockIE();
     //canonicalization for non-existing flash messages
     if (!empty($this->params[self::FLASH_KEY]) && !$this->hasFlashSession()) {
         $params = $this->params;
         unset($params[self::FLASH_KEY]);
         $this->redirect(IHttpResponse::S301_MOVED_PERMANENTLY, 'this', $params);
     }
     //		if (Environment::getConfig('langs')->multipleLangs) {
     $this->setSupportedLangs();
     $this->checkAndRegisterLang();
     //		}
     $this->registerTranslator();
     $this->registerUser();
     Environment::setVariable('basePath', substr(Environment::getVariable('baseUri'), 0, -1));
     UserPanel::register()->addCredentials('admin', 'adminHeslo')->addCredentials('user', 'userHeslo')->setNameColumn('username');
 }
开发者ID:radypala,项目名称:maga-website,代码行数:20,代码来源:BasePresenter.php

示例8: startup

 public function startup()
 {
     parent::startup();
     if (!isset($this->lang)) {
         $this->lang = $this->getHttpRequest()->detectLanguage($this->langs);
         if ($this->lang == null) {
             $this->lang = 'en';
         }
         $this->canonicalize();
     }
     $this->translator = Environment::getService('Mokuji\\Translator\\Admin');
     $this->translator->lang = $this->lang;
     //$this->translator = new Admin_Translator($this->lang);
     $cache = Environment::getCache('langs');
     $langs = $cache->offsetGet('langs');
     if ($langs == NULL) {
         $this->langs = $this->translator->getSupportedLangs();
         //$this->model('lang')->getAll();
         $cache->save('langs', $this->langs);
     } else {
         $this->langs = $langs;
     }
     $this->refreshConfig();
 }
开发者ID:bazo,项目名称:Mokuji,代码行数:24,代码来源:AdminBasePresenter.php

示例9: startup

 public function startup()
 {
     //Debug::timer();
     parent::startup();
     dibi::query('SET AUTOCOMMIT=0');
 }
开发者ID:jaroslavlibal,项目名称:MDW,代码行数:6,代码来源:BasePresenter.php

示例10: startup

 protected function startup()
 {
     parent::startup();
     $this->mycontrol = new TestControl($this, 'mycontrol');
     echo "\n<hr><h2>Presenter & action link</h2>\n";
     $uri = $this->link('product', array('var1' => $this->var1));
     echo "1.1 {$uri}\n\n";
     $uri = $this->link('product', array('var1' => $this->var1 * 2, 'ok' => TRUE));
     echo "1.2 {$uri}\n\n";
     $uri = $this->link('product', array('var1' => TRUE, 'ok' => '0'));
     echo "1.3 {$uri}\n\n";
     $uri = $this->link('product', array('var1' => NULL, 'ok' => 'a'));
     echo "1.4 {$uri}\n\n";
     $uri = $this->link('product', array('var1' => array(1), 'ok' => FALSE));
     echo "1.5 {$uri}\n\n";
     $uri = $this->link('product', 1, 2);
     echo "1.6 {$uri}\n\n";
     $uri = $this->link('product', array('x' => 1, 'y' => 2));
     echo "1.7 {$uri}\n\n";
     $uri = $this->link('product');
     echo "1.8 {$uri}\n\n";
     $uri = $this->link('');
     echo "1.9 {$uri}\n\n";
     $uri = $this->link('product?x=1&y=2');
     echo "1.10 {$uri}\n\n";
     $uri = $this->link('product?x=1&y=2#fragment');
     echo "1.11 {$uri}\n\n";
     $uri = $this->link('//product?x=1&y=2#fragment');
     echo "1.12 {$uri}\n\n";
     echo "\n<hr><h2>Presenter & signal link</h2>\n";
     $uri = $this->link('buy!', array('var1' => $this->var1));
     echo "2.1 {$uri}\n\n";
     $uri = $this->link('buy!', array('var1' => $this->var1 * 2));
     echo "2.2 {$uri}\n\n";
     $uri = $this->link('buy!', 1, 2);
     echo "2.3 {$uri}\n\n";
     $uri = $this->link('buy!', '1', '2');
     echo "2.4 {$uri}\n\n";
     $uri = $this->link('buy!', '1a', NULL);
     echo "2.5 {$uri}\n\n";
     $uri = $this->link('buy!', TRUE, FALSE);
     echo "2.6 {$uri}\n\n";
     $uri = $this->link('buy!', array(1), (object) array(1));
     echo "2.7 {$uri}\n\n";
     $uri = $this->link('buy!', array(1, 'y' => 2));
     echo "2.8 {$uri}\n\n";
     $uri = $this->link('buy!', array('x' => 1, 'y' => 2, 'var1' => $this->var1));
     echo "2.9 {$uri}\n\n";
     $uri = $this->link('!');
     echo "2.10 {$uri}\n\n";
     $uri = $this->link('this', array('var1' => $this->var1));
     echo "2.11 {$uri}\n\n";
     $uri = $this->link('this!', array('var1' => $this->var1));
     echo "2.12 {$uri}\n\n";
     echo "\n<hr><h2>Component link</h2>\n";
     $uri = $this->mycontrol->link('', 0, 1);
     echo "3.1 {$uri}\n\n";
     $uri = $this->mycontrol->link('click', 0, 1);
     echo "3.2 {$uri}\n\n";
     $uri = $this->mycontrol->link('click', '0a', '1a');
     echo "3.3 {$uri}\n\n";
     $uri = $this->mycontrol->link('click', array(1), (object) array(1));
     echo "3.4 {$uri}\n\n";
     $uri = $this->mycontrol->link('click', TRUE, FALSE);
     echo "3.5 {$uri}\n\n";
     $uri = $this->mycontrol->link('click', NULL, '');
     echo "3.6 {$uri}\n\n";
     $uri = $this->mycontrol->link('click', 1, 2, 3);
     echo "3.7 {$uri}\n\n";
     $uri = $this->mycontrol->link('click!', array('x' => 1, 'y' => 2, 'round' => 0));
     echo "3.8 {$uri}\n\n";
     $uri = $this->mycontrol->link('click', array('x' => 1, 'round' => 1));
     echo "3.9 {$uri}\n\n";
     $uri = $this->mycontrol->link('this', array('x' => 1, 'round' => 1));
     echo "3.10 {$uri}\n\n";
     $uri = $this->mycontrol->link('this?x=1&round=1');
     echo "3.11 {$uri}\n\n";
     $uri = $this->mycontrol->link('this?x=1&round=1#frag');
     echo "3.12 {$uri}\n\n";
     $uri = $this->mycontrol->link('//this?x=1&round=1#frag');
     echo "3.13 {$uri}\n\n";
 }
开发者ID:vrana,项目名称:nette,代码行数:82,代码来源:test.link.php

示例11: startup

 public function startup()
 {
     parent::startup();
     PagesModel::$lang = $this->lang;
     $this->pages = PagesModel::getRoot();
 }
开发者ID:osmcz,项目名称:website,代码行数:6,代码来源:CommonBasePresenter.php


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