本文整理汇总了PHP中BaseController::initialize方法的典型用法代码示例。如果您正苦于以下问题:PHP BaseController::initialize方法的具体用法?PHP BaseController::initialize怎么用?PHP BaseController::initialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseController
的用法示例。
在下文中一共展示了BaseController::initialize方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initialize
public function initialize()
{
parent::initialize();
$this->assign('add_classes', '/' . MODULE_NAME . '/' . CONTROLLER_NAME . '/addClasses');
$this->assign('del_classes', '/' . MODULE_NAME . '/' . CONTROLLER_NAME . '/delClasses');
$this->assign('upload_import_student', '/' . MODULE_NAME . '/' . CONTROLLER_NAME . '/uploadImportStudent');
}
示例2: initialize
public function initialize()
{
parent::initialize();
//初始化微信
// $this->di['wechat']->init('wx37bd32740aa7ea94','919d981e86e0b24e27aa9bd14bc9865e')->getAccessToken();
$this->di['wechat']->init('wx3591746ed2cb11ed', '641f549613e5987c6be4c210f0462c10')->getAccessToken();
}
示例3: initialize
/**
* Set all forms.
*/
public function initialize()
{
parent::initialize();
if (!isset($this->view->forms)) {
$this->view->activeForm = 'General';
$this->view->forms = array('General' => new SettingsGeneralForm($this->config), 'Dashboard' => new SettingsDashboardForm($this->config));
//$this->view->formUsers = new SettingsUsersForm(Users::Find());
$this->view->formDevices = new SettingsDevicesForm(Devices::Find());
$this->view->formMenu = new SettingsMenuItemsForm(MenuItems::Find(array('order' => 'name')));
$this->view->formNewMenuItem = new SettingsMenuItemsNewForm();
$this->view->formNewDevice = new SettingsDevicesNewForm();
}
}
示例4: initialize
public function initialize()
{
parent::initialize();
$login = $this->session->get('login');
$custom = $this->session->get('custom');
if ($login) {
if (!$custom) {
$user = $this->crypt->decrypt($login);
$user = Custom::findfirst(array('name' => 'yunhai'));
if (!$user->uname) {
$this->forward('UserLogin/index');
}
$this->session->set('custom', $user->database);
}
} else {
return $this->forward('UserLogin/index');
}
}
示例5: initialize
public function initialize()
{
parent::initialize();
}
示例6: initialize
public function initialize()
{
parent::initialize();
$this->view->setRenderLevel(View::LEVEL_AFTER_TEMPLATE);
}
示例7: initialize
public function initialize()
{
parent::initialize();
$this->assign('readingStatusClasses_url', '/' . MODULE_NAME . '/index/readingStatusClasses');
}
示例8: indexAction
public function indexAction()
{
Tag::setTitle('Admin');
parent::initialize();
}
示例9: initialize
public function initialize()
{
//Set the document title
Phalcon\Tag::setTitle('Index');
parent::initialize();
}
示例10: initialize
function initialize()
{
parent::initialize();
$this->view->setTemplateAfter('main');
}
示例11: initialize
public function initialize()
{
\Phalcon\Tag::setTitle('上传');
parent::initialize();
}
示例12: initialize
function initialize($d = '')
{
parent::initialize();
$this->view->setTemplateAfter('main');
$this->view->page = 'Bugs';
}
示例13: indexAction
public function indexAction()
{
Tag::setTitle('Sign In');
$this->assets->collection('additional')->addCss('css/signin.css');
parent::initialize();
}
示例14: initialize
public function initialize()
{
parent::initialize();
$this->objBase = new \ST\Common\Controllers\BookController($this);
}
示例15: initialize
public function initialize()
{
parent::initialize();
$this->objGood = new \ST\Common\Controllers\GoodController($this);
}