本文整理匯總了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);
}