當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。