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


PHP Gdn_Controller::initialize方法代码示例

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


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

示例1: initialize

 /**
  * Adds JS, CSS, & modules. Automatically run on every use.
  *
  * @since 2.0.0
  * @access public
  */
 public function initialize()
 {
     $this->ModuleSortContainer = 'Profile';
     $this->Head = new HeadModule($this);
     $this->addJsFile('jquery.js');
     $this->addJsFile('jquery.form.js');
     $this->addJsFile('jquery.popup.js');
     $this->addJsFile('jquery.gardenhandleajaxform.js');
     $this->addJsFile('jquery.autosize.min.js');
     $this->addJsFile('global.js');
     $this->addCssFile('style.css');
     $this->addCssFile('vanillicon.css', 'static');
     $this->addModule('GuestModule');
     parent::initialize();
     Gdn_Theme::section('Profile');
     if ($this->EditMode) {
         $this->CssClass .= 'EditMode';
     }
     /**
      * The default Cache-Control header does not include no-store, which can cause issues with outdated session
      * information (e.g. message button missing). The same check is performed here as in Gdn_Controller before the
      * Cache-Control header is added, but this value includes the no-store specifier.
      */
     if (Gdn::session()->isValid()) {
         $this->setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');
     }
     $this->setData('Breadcrumbs', array());
     $this->CanEditPhotos = Gdn::session()->checkRankedPermission(c('Garden.Profile.EditPhotos', true)) || Gdn::session()->checkPermission('Garden.Users.Edit');
 }
开发者ID:R-J,项目名称:vanilla,代码行数:35,代码来源:class.profilecontroller.php

示例2: initialize

 /**
  * Before every controller method call.
  */
 public function initialize()
 {
     if ($this->deliveryType() == DELIVERY_TYPE_ALL) {
         $this->Head = new HeadModule($this);
     }
     $this->addCssFile('style.css');
     parent::initialize();
 }
开发者ID:vanilla,项目名称:community,代码行数:11,代码来源:class.vforgcontroller.php

示例3: initialize

 /**
  * Do this before anything else.
  */
 public function initialize()
 {
     parent::initialize();
     if ($this->deliveryType() == DELIVERY_TYPE_ALL) {
         $this->Head = new HeadModule($this);
     }
     $this->addCssFile('style.css');
     $this->addCssFile('addons.css');
     $this->CountCommentsPerPage = c('Vanilla.Comments.PerPage', 30);
 }
开发者ID:vanilla,项目名称:community,代码行数:13,代码来源:class.addonscontroller.php

示例4: initialize

 /**
  * Before all method calls.
  */
 public function initialize()
 {
     $this->Head = new HeadModule($this);
     $this->addJsFile('jquery.js');
     $this->addJsFile('jquery.form.js');
     $this->addJsFile('jquery.popup.js');
     $this->addJsFile('jquery.gardenhandleajaxform.js');
     $this->addJsFile('global.js');
     $this->addCssFile('admin.css');
     $this->MasterView = 'admin';
     parent::initialize();
 }
开发者ID:vanilla,项目名称:community,代码行数:15,代码来源:class.vstatscontroller.php

示例5: initialize

 /**
  * CSS, JS and module includes.
  */
 public function initialize()
 {
     $this->Head = new HeadModule($this);
     $this->addJsFile('jquery.js');
     $this->addJsFile('jquery.form.js');
     $this->addJsFile('jquery.popup.js');
     $this->addJsFile('jquery.gardenhandleajaxform.js');
     $this->addJsFile('global.js');
     $this->addCssFile('style.css');
     $this->addCssFile('vanillicon.css', 'static');
     $this->addModule('GuestModule');
     parent::initialize();
 }
开发者ID:austins,项目名称:vanilla,代码行数:16,代码来源:class.notificationscontroller.php

示例6: initialize

 /**
  * Include JS and CSS used by all methods.
  *
  * Always called by dispatcher before controller's requested method.
  *
  * @since 2.0.0
  * @access public
  */
 public function initialize()
 {
     $this->Head = new HeadModule($this);
     $this->Head->addTag('meta', array('name' => 'robots', 'content' => 'noindex'));
     $this->addJsFile('jquery.js');
     $this->addJsFile('jquery.form.js');
     $this->addJsFile('jquery.popup.js');
     $this->addJsFile('jquery.gardenhandleajaxform.js');
     $this->addJsFile('global.js');
     $this->addCssFile('style.css');
     $this->addCssFile('vanillicon.css', 'static');
     parent::initialize();
     Gdn_Theme::section('Entry');
 }
开发者ID:korelstar,项目名称:vanilla,代码行数:22,代码来源:class.entrycontroller.php

示例7: initialize

 /**
  * Add JS, CSS, modules. Automatically run on every use.
  *
  * @since 2.0.0
  * @access public
  */
 public function initialize()
 {
     $this->Head = new HeadModule($this);
     $this->addJsFile('jquery.js');
     $this->addJsFile('jquery.form.js');
     $this->addJsFile('jquery.popup.js');
     $this->addJsFile('jquery.gardenhandleajaxform.js');
     $this->addJsFile('jquery.expander.js');
     $this->addJsFile('global.js');
     $this->addCssFile('style.css');
     $this->addCssFile('vanillicon.css', 'static');
     $this->addCssFile('menu.css');
     $this->addModule('GuestModule');
     parent::initialize();
     $this->setData('Breadcrumbs', array(array('Name' => t('Search'), 'Url' => '/search')));
 }
开发者ID:vanilla,项目名称:vanilla,代码行数:22,代码来源:class.searchcontroller.php

示例8: initialize

 /**
  * Include JS, CSS, and modules used by all methods.
  *
  * Always called by dispatcher before controller's requested method.
  *
  * @since 2.0.0
  * @access public
  */
 public function initialize()
 {
     $this->Head = new HeadModule($this);
     $this->addJsFile('jquery.js');
     $this->addJsFile('jquery.form.js');
     $this->addJsFile('jquery.popup.js');
     $this->addJsFile('jquery.gardenhandleajaxform.js');
     $this->addJsFile('global.js');
     $this->addCssFile('style.css');
     $this->addCssFile('vanillicon.css', 'static');
     // Add Modules
     $this->addModule('GuestModule');
     $this->addModule('SignedInModule');
     parent::initialize();
     Gdn_Theme::section('ActivityList');
     $this->setData('Breadcrumbs', array(array('Name' => t('Activity'), 'Url' => '/activity')));
 }
开发者ID:sitexa,项目名称:vanilla,代码行数:25,代码来源:class.activitycontroller.php

示例9: initialize

 /**
  * Include JS, CSS, and modules used by all methods.
  *
  * Always called by dispatcher before controller's requested method.
  *
  * @since 2.0.0
  * @access public
  */
 public function initialize()
 {
     // Set up head
     $this->Head = new HeadModule($this);
     $this->addJsFile('jquery.js');
     $this->addJsFile('jquery.form.js');
     $this->addJsFile('jquery.popup.js');
     $this->addJsFile('jquery.gardenhandleajaxform.js');
     $this->addJsFile('jquery.atwho.js');
     $this->addJsFile('global.js');
     $this->addCssFile('style.css');
     $this->addCssFile('vanillicon.css', 'static');
     // Add modules
     //      $this->addModule('MeModule');
     $this->addModule('GuestModule');
     $this->addModule('SignedInModule');
     parent::initialize();
 }
开发者ID:caidongyun,项目名称:vanilla,代码行数:26,代码来源:class.vanillacontroller.php

示例10: initialize

 /**
  * Adds JS, CSS, & modules. Automatically run on every use.
  *
  * @since 2.0.0
  * @access public
  */
 public function initialize()
 {
     $this->ModuleSortContainer = 'Profile';
     $this->Head = new HeadModule($this);
     $this->addJsFile('jquery.js');
     $this->addJsFile('jquery.form.js');
     $this->addJsFile('jquery.popup.js');
     $this->addJsFile('jquery.gardenhandleajaxform.js');
     $this->addJsFile('jquery.autosize.min.js');
     $this->addJsFile('global.js');
     $this->addCssFile('style.css');
     $this->addCssFile('vanillicon.css', 'static');
     $this->addModule('GuestModule');
     parent::initialize();
     Gdn_Theme::section('Profile');
     if ($this->EditMode) {
         $this->CssClass .= 'EditMode';
     }
     $this->setData('Breadcrumbs', array());
     $this->CanEditPhotos = c('Garden.Profile.EditPhotos') || Gdn::session()->checkPermission('Garden.Users.Edit');
 }
开发者ID:korelstar,项目名称:vanilla,代码行数:27,代码来源:class.profilecontroller.php

示例11: initialize

 /**
  * Include JS, CSS, and modules used by all methods.
  *
  * Always called by dispatcher before controller's requested method.
  *
  * @since 2.0.0
  * @access public
  */
 public function initialize()
 {
     // You've got to be signed in to send private messages.
     if (!Gdn::session()->isValid()) {
         redirect('/entry/signin?Target=' . urlencode($this->SelfUrl));
     }
     if ($this->deliveryType() == DELIVERY_TYPE_ALL) {
         $this->Head = new HeadModule($this);
         $this->addJsFile('jquery.js');
         $this->addJsFile('jquery.form.js');
         $this->addJsFile('jquery.popup.js');
         $this->addJsFile('jquery.gardenhandleajaxform.js');
         $this->addJsFile('jquery.autosize.min.js');
         $this->addJsFile('jquery.tokeninput.js');
         $this->addJsFile('global.js');
         $this->addJsFile('conversations.js');
     }
     $this->addCssFile('style.css');
     $this->addCssFile('vanillicon.css', 'static');
     parent::initialize();
 }
开发者ID:caidongyun,项目名称:vanilla,代码行数:29,代码来源:class.conversationscontroller.php

示例12: initialize

 /**
  * Include JS, CSS, and modules used by all methods.
  *
  * Always called by dispatcher before controller's requested method.
  *
  * @since 2.0.0
  * @access public
  */
 public function initialize()
 {
     $this->Head = new HeadModule($this);
     $this->addJsFile('jquery.js');
     $this->addJsFile('jquery.form.js');
     $this->addJsFile('jquery.popup.js');
     $this->addJsFile('jquery.gardenhandleajaxform.js');
     $this->addJsFile('magnific-popup.min.js');
     $this->addJsFile('jquery.autosize.min.js');
     $this->addJsFile('global.js');
     if (in_array($this->ControllerName, array('profilecontroller', 'activitycontroller'))) {
         $this->addCssFile('style.css');
         $this->addCssFile('vanillicon.css', 'static');
     } else {
         if (!c('Garden.Cdns.Disable', false)) {
             $this->addCssFile('https://fonts.googleapis.com/css?family=Rokkitt');
         }
         $this->addCssFile('admin.css');
         $this->addCssFile('magnific-popup.css');
     }
     $this->MasterView = 'admin';
     parent::initialize();
 }
开发者ID:caidongyun,项目名称:vanilla,代码行数:31,代码来源:class.dashboardcontroller.php

示例13: initialize

 /**
  * Switch MasterView. Include JS, CSS used by all methods.
  *
  * Always called by dispatcher before controller's requested method.
  *
  * @since 2.0.0
  * @access public
  */
 public function initialize()
 {
     // Set up head
     $this->Head = new HeadModule($this);
     $this->addJsFile('jquery.js');
     $this->addJsFile('jquery.livequery.js');
     $this->addJsFile('jquery.form.js');
     $this->addJsFile('jquery.popup.js');
     $this->addJsFile('jquery.gardenhandleajaxform.js');
     $this->addJsFile('jquery.atwho.js');
     $this->addJsFile('jquery.autosize.min.js');
     $this->addJsFile('global.js');
     if (in_array($this->ControllerName, array('profilecontroller', 'activitycontroller'))) {
         $this->addCssFile('style.css');
         $this->addCssFile('vanillicon.css', 'static');
     } else {
         $this->addCssFile('admin.css');
     }
     // Change master template
     $this->MasterView = 'admin';
     parent::initialize();
     Gdn_Theme::section('Dashboard');
 }
开发者ID:akratiani,项目名称:vanilla,代码行数:31,代码来源:class.settingscontroller.php


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