本文整理汇总了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;
}
示例2: init
public function init()
{
$this->view->style = array("screen" => "login.css");
$this->_authCheckRequired = false;
parent::init();
$this->_generateAuthAdapter();
}
示例3: init
public function init()
{
$this->view->title = 'Report Case';
$this->view->page = 'report';
$this->view->mycontroller = 'ReportController';
$this->view->language = 'th';
parent::init();
}
示例4: init
/**
* Init
*
* @return null
*/
public function init()
{
parent::init();
$pluginDependencies = craft()->social_plugin->getPluginDependencies();
if (count($pluginDependencies) > 0) {
$this->redirect('social/install');
}
}
示例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');
}
示例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');
}
示例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();
}
示例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');
}
示例9: init
/**
* 自动运行
*/
public function init()
{
parent::init();
$this->model = new Model_Project();
// XSS过滤
if ($this->request->isPost()) {
$_POST = array_map('xss', $_POST);
}
}
示例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';
}
示例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');
}
示例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();
}
示例13: init
/**
* 自动运行
*/
public function init()
{
// 检测系统是否正常安装了
if (!file_exists(APPLICATION_PATH . '/Data/Logs/install.lock')) {
$this->gotoUri('setup');
}
// 初始化基类控制器
parent::init();
}
示例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');
}
}
示例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();
}