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


PHP BaseController::init方法代码示例

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


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

示例1: init

 public function init()
 {
     $initRes = parent::init();
     $this->setLayout('frontend');
     $this->addBlock('FOOTER_TOOLBAR', 'toolbar', 'block/toolbar');
     $this->addBlock('CATEGORY_BOX', 'boxCategory', 'block/box/category');
     $this->addBlock('ROOT_CATEGORIES', 'boxRootCategory', 'block/box/rootCategory');
     $this->addBlock('DYNAMIC_CATEGORIES', 'dynamicCategoryMenu', 'block/box/dynamicCategory');
     $this->addBlock('SALE_ITEMS', 'saleItems', 'block/box/saleItems');
     $this->addBlock('NEWEST_PRODUCTS', 'newestProducts', 'block/box/newestProducts');
     $this->addBlock('BESTSELLING_PRODUCTS', 'bestsellingProducts', 'block/box/bestsellingProducts');
     $this->addBlock('BREADCRUMB', 'boxBreadCrumb', 'block/box/breadcrumb');
     $this->addBlock('BREADCRUMB_TITLE', 'boxBreadCrumbTitle', 'block/box/breadcrumbTitle');
     $this->addBlock('LANGUAGE', 'boxLanguageSelect', 'block/box/language');
     $this->addBlock('CURRENCY', 'boxSwitchCurrency', 'block/box/currency');
     $this->addBlock('CURRENCY_MENU', 'boxSwitchCurrencyMenu', 'block/box/currencyMenu');
     $this->addBlock('CART', 'boxShoppingCart', 'block/box/shoppingCart');
     $this->addBlock('SEARCH', 'boxSearch', 'block/box/search');
     $this->addBlock('INFORMATION', 'boxInformationMenu', 'block/box/informationMenu');
     $this->addBlock('NEWSLETTER', 'boxNewsletterSubscribe', 'block/box/newsletterSubscribe');
     $this->addBlock('TRACKING', 'tracking', 'block/tracking');
     $this->addBlock('NEWS', 'latestNews', 'block/box/latestNews');
     $this->addBlock('QUICKNAV', 'blockQuickNav', 'block/box/quickNav');
     $this->addBlock('COMPARE', array('compare', 'compareMenu'));
     $this->addBlock('MINI_CART', array('order', 'miniCart'), 'order/miniCartBlock');
     $this->addBlock('QUICK_LOGIN', 'quickLogin', 'user/block/quickLoginBlock');
     $this->application->logStat('Init FrontendController');
     return $initRes;
 }
开发者ID:saiber,项目名称:www,代码行数:29,代码来源:FrontendController.php

示例2: init

 public function init()
 {
     $this->view->style = array("screen" => "login.css");
     $this->_authCheckRequired = false;
     parent::init();
     $this->_generateAuthAdapter();
 }
开发者ID:rafaelcastelani,项目名称:Newsletter,代码行数:7,代码来源:LoginController.php

示例3: init

 public function init()
 {
     $this->view->title = 'Report Case';
     $this->view->page = 'report';
     $this->view->mycontroller = 'ReportController';
     $this->view->language = 'th';
     parent::init();
 }
开发者ID:KBO-Techo-Dev,项目名称:5000sCampaignFrontEnd,代码行数:8,代码来源:ReportController.php

示例4: init

 /**
  * Init
  *
  * @return null
  */
 public function init()
 {
     parent::init();
     $pluginDependencies = craft()->social_plugin->getPluginDependencies();
     if (count($pluginDependencies) > 0) {
         $this->redirect('social/install');
     }
 }
开发者ID:ericnormannn,项目名称:m,代码行数:13,代码来源:Social_LoginProvidersController.php

示例5: init

 protected function init()
 {
     parent::init();
     $this->set_title('Emeraldion Lodge');
     $this->set_description(l('Personal website of Claudio Procida, hosting my projects and my blog'));
     $this->credentials = $this->get_credentials();
     $this->before_filter('init_opengraph');
 }
开发者ID:emeraldion,项目名称:zelda,代码行数:8,代码来源:eme_controller.php

示例6: init

 public function init()
 {
     $this->view->title = 'Sign in';
     $this->view->page = 'signin';
     $this->view->mycontroller = 'SigninController';
     parent::init();
     $this->network_api = Zend_Registry::get('network_api');
 }
开发者ID:KBO-Techo-Dev,项目名称:5000sCampaignFrontEnd,代码行数:8,代码来源:SigninController.php

示例7: init

 public function init()
 {
     parent::init();
     if (Yii::app()->user->isGuest && trim($_SERVER['REQUEST_URI'], '/') != 'admin/login') {
         $this->redirect('/admin/login');
     }
     $this->initTabs();
     //$this->initAssets();
 }
开发者ID:nizsheanez,项目名称:alp.ru,代码行数:9,代码来源:AdminController.php

示例8: init

 public function init()
 {
     $this->view->title = 'ARTICLES';
     $this->view->page = 'articles';
     $this->view->mycontroller = 'ArticlesController';
     $this->view->language = 'th';
     parent::init();
     $this->network_api = Zend_Registry::get('network_api');
 }
开发者ID:KBO-Techo-Dev,项目名称:5000sCampaignFrontEnd,代码行数:9,代码来源:ArticlesController.php

示例9: init

 /**
  * 自动运行
  */
 public function init()
 {
     parent::init();
     $this->model = new Model_Project();
     // XSS过滤
     if ($this->request->isPost()) {
         $_POST = array_map('xss', $_POST);
     }
 }
开发者ID:laiello,项目名称:quickbug,代码行数:12,代码来源:ProjectController.php

示例10: init

 public function init()
 {
     parent::init();
     $clientScript = Yii::app()->clientScript;
     $clientScript->registerScriptFile("/js/bootstrapValidator.min.js", CClientScript::POS_BEGIN);
     $clientScript->registerCssFile("/css/bootstrapValidator.min.css", CClientScript::POS_BEGIN);
     //$this->info = Yii::app()->user->getState('info');
     //$this->layout = '//layouts/main2';
 }
开发者ID:kl0428,项目名称:admin,代码行数:9,代码来源:ManagerController.php

示例11: init

 function init()
 {
     parent::init();
     $this->_setNeedsParams(array('topic'));
     $topics = $this->_getResults('_digg', 'getRandomStories');
     $rightPanel['diggNews'] = $this->view->partial('common/_right_panel.phtml', array('name' => 'digg-news', 'news' => $topics));
     $this->view->rightPanel = $rightPanel;
     $this->view->topics = $this->_getResults('_digg', 'getTopics');
 }
开发者ID:baphled,项目名称:boodah,代码行数:9,代码来源:NewsController.php

示例12: init

 public function init()
 {
     $this->setLayout('empty');
     $this->addBlock('USER_MENU', 'boxUserMenu', 'block/backend/userMenu');
     $this->addBlock('TRANSLATIONS', 'translations', 'block/backend/translations');
     $this->addBlock('FOOTER_TOOLBAR', 'toolbar', 'block/backend/toolbar');
     $this->getPendingModuleUpdateStats($this->application);
     return parent::init();
 }
开发者ID:saiber,项目名称:livecart,代码行数:9,代码来源:BackendController.php

示例13: init

 /**
  * 自动运行
  */
 public function init()
 {
     // 检测系统是否正常安装了
     if (!file_exists(APPLICATION_PATH . '/Data/Logs/install.lock')) {
         $this->gotoUri('setup');
     }
     // 初始化基类控制器
     parent::init();
 }
开发者ID:laiello,项目名称:quickbug,代码行数:12,代码来源:IndexController.php

示例14: init

 public function init()
 {
     parent::init();
     // If request is Ajax, we disable the layout
     if ($this->_request->isXmlHttpRequest()) {
         $this->_helper->layout->disableLayout();
     } else {
         $this->_helper->layout->setlayout('story_mapview');
     }
 }
开发者ID:kreativmind,项目名称:storytlr,代码行数:10,代码来源:StorymapController.php

示例15: init

 /**
  * Determines the assetPath for the controller from the module
  */
 public function init()
 {
     $this->modulePathAlias = 'application.modules.' . $this->getModule()->name;
     $this->assetPathAlias = $this->modulePathAlias . '.assets';
     // Set asset path
     if (file_exists(Yii::getPathOfAlias($this->assetPathAlias))) {
         $this->assetPath = Yii::app()->assetManager->getPublishedPathOfAlias('application.modules.' . $this->getModule()->name . '.assets');
     }
     return parent::init();
 }
开发者ID:code-4-england,项目名称:OpenEyes,代码行数:13,代码来源:BaseModuleController.php


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