本文整理汇总了PHP中Gdn_Controller::Initialize方法的典型用法代码示例。如果您正苦于以下问题:PHP Gdn_Controller::Initialize方法的具体用法?PHP Gdn_Controller::Initialize怎么用?PHP Gdn_Controller::Initialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gdn_Controller
的用法示例。
在下文中一共展示了Gdn_Controller::Initialize方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Initialize
public function Initialize()
{
if ($this->DeliveryType() == DELIVERY_TYPE_ALL) {
$this->Head = new HeadModule($this);
}
parent::Initialize();
}
示例2: Initialize
/**
* All requests to this controller must be made via JS.
*
* @throws PermissionException
*/
public function Initialize()
{
parent::Initialize();
$this->Application = 'Yaga';
if (!$this->Request->IsPostBack()) {
throw PermissionException('Javascript');
}
}
示例3: Initialize
public function Initialize()
{
parent::Initialize();
$this->_DeliveryMethod = DELIVERY_METHOD_JSON;
//$this->SetHeader("Content-Type", "application/json; charset=utf-8");
$this->SetHeader("Content-Type", "text/plain; charset=utf-8");
$this->MasterView = 'json';
}
示例4: Initialize
/**
* This is a good place to include JS, CSS, and modules used by all methods of this controller.
*
* Always called by dispatcher before controller's requested method.
*
* @since 1.0
* @access public
*/
public function Initialize() {
// There are 4 delivery types used by Render().
// DELIVERY_TYPE_ALL is the default and indicates an entire page view.
if ($this->DeliveryType() == DELIVERY_TYPE_ALL)
$this->Head = new HeadModule($this);
// Call Gdn_Controller's Initialize() as well.
parent::Initialize();
}
示例5: Initialize
public function Initialize() {
$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('global.js');
$this->AddCssFile('style.css');
$this->AddModule('GuestModule');
parent::Initialize();
}
示例6: Initialize
public function Initialize()
{
$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('global.js');
$this->AddCssFile('admin.css');
$this->MasterView = 'empty';
parent::Initialize();
}
示例7: 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.livequery.js');
$this->AddJsFile('jquery.form.js');
$this->AddJsFile('jquery.popup.js');
$this->AddJsFile('jquery.gardenhandleajaxform.js');
$this->AddJsFile('global.js');
$this->AddCssFile('style.css');
parent::Initialize();
Gdn_Theme::Section('Entry');
}
示例8: Initialize
public function Initialize()
{
$this->Head = new HeadModule($this);
$this->AddJsFile('js/library/jquery.js');
$this->AddJsFile('js/library/jquery.livequery.js');
$this->AddJsFile('js/library/jquery.form.js');
$this->AddJsFile('js/library/jquery.popup.js');
// $this->AddJsFile('js/library/jquery.menu.js');
$this->AddJsFile('js/library/jquery.gardenhandleajaxform.js');
$this->AddJsFile('js/global.js');
$this->AddCssFile('style.css');
$GuestModule = new GuestModule($this);
$this->AddModule($GuestModule);
parent::Initialize();
}
示例9: Initialize
/**
* Include JS, CSS, and modules used by all methods of this controller.
* Called by dispatcher before controller's requested method.
*/
public function Initialize()
{
if ($this->DeliveryType() == DELIVERY_TYPE_ALL) {
$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('global.js');
$this->AddCssFile('style.css');
parent::Initialize();
$this->FireEvent('AfterInitialize');
}
示例10: Initialize
public function Initialize()
{
if ($this->DeliveryType() == DELIVERY_TYPE_ALL) {
$this->Head = new HeadModule($this);
$this->AddJsFile('jquery.js');
$this->AddJsFile('jquery.livequery.js');
$this->AddJsFile('global.js');
$this->AddCssFile('style.css');
$this->AddCssFile('candy.css');
//$this->AddSideMenu();
$this->AddJsFile('candy.js');
// Application global js
}
parent::Initialize();
}
示例11: Initialize
public function Initialize()
{
$this->Head = new HeadModule($this);
$this->AddJsFile('js/library/jquery.js');
$this->AddJsFile('js/library/jquery.livequery.js');
$this->AddJsFile('js/library/jquery.form.js');
$this->AddJsFile('js/library/jquery.popup.js');
$this->AddJsFile('js/library/jquery.menu.js');
$this->AddJsFile('js/library/jquery.gardenhandleajaxform.js');
$this->AddJsFile('js/global.js');
$this->AddCssFile('style.css');
$GuestModule = new GuestModule($this);
$GuestModule->MessageCode = "It looks like you're new here. If you want to take part in the discussions, click one of these buttons!";
$this->AddModule($GuestModule);
parent::Initialize();
}
示例12: Initialize
/**
* Initializes a frontend controller with the Best Filter, New Discussion, and
* Discussion Filter modules.
*/
public function Initialize()
{
parent::Initialize();
$this->Application = 'Yaga';
$this->Head = new HeadModule($this);
$this->AddJsFile('jquery.js');
$this->AddJsFile('jquery-ui.js');
$this->AddJsFile('jquery.livequery.js');
$this->AddJsFile('jquery.popup.js');
$this->AddJsFile('global.js');
$this->AddCssFile('style.css');
$this->AddCssFile('reactions.css');
$this->AddModule('BestFilterModule');
$this->AddModule('NewDiscussionModule');
$this->AddModule('DiscussionFilterModule');
}
示例13: 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.livequery.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('menu.css');
$this->AddModule('GuestModule');
parent::Initialize();
$this->SetData('Breadcrumbs', array(array('Name' => T('Search'), 'Url' => '/search')));
}
示例14: 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.livequery.js');
$this->AddJsFile('jquery.form.js');
$this->AddJsFile('jquery.popup.js');
$this->AddJsFile('jquery.gardenhandleajaxform.js');
$this->AddJsFile('global.js');
$this->AddCssFile('style.css');
// Add Modules
$this->AddModule('GuestModule');
$this->AddModule('SignedInModule');
parent::Initialize();
Gdn_Theme::Section('ActivityList');
$this->SetData('Breadcrumbs', array(array('Name' => T('Activity'), 'Url' => '/activity')));
}
示例15: Initialize
public function Initialize()
{
$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('global.js');
if (in_array($this->ControllerName, array('profilecontroller', 'activitycontroller'))) {
$this->AddCssFile('style.css');
} else {
$this->AddCssFile('admin.css');
}
$this->MasterView = 'admin';
parent::Initialize();
}