本文整理汇总了PHP中ControllerBase::initialize方法的典型用法代码示例。如果您正苦于以下问题:PHP ControllerBase::initialize方法的具体用法?PHP ControllerBase::initialize怎么用?PHP ControllerBase::initialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ControllerBase
的用法示例。
在下文中一共展示了ControllerBase::initialize方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: editAction
public function editAction()
{
$this->tag->setTitle('Каталог | Изменить товар');
parent::initialize();
$products = Real::findFirst($this->dispatcher->getParams("id"));
$auth = $this->session->get('auth');
$profile = $auth['id'];
$get_id = $products->user_id;
if ($profile != $get_id) {
$this->flash->error("Нет прав редактирования!");
$this->view->prof_user = false;
} else {
$this->view->prof_user = true;
$this->view->product = $products;
/*Если есть данные, то сохраняем*/
if ($this->request->isPost()) {
$products->name = $this->request->getPost('name');
$products->price = $this->request->getPost('price');
$products->cover = $this->request->getPost('cover');
$products->description = $this->request->getPost('description');
$products->img2 = $this->request->getPost('img2');
$products->img3 = $this->request->getPost('img3');
$products->img4 = $this->request->getPost('img4');
if ($products->update() == false) {
foreach ($products->getMessages() as $message) {
$this->flash->error((string) $message);
}
} else {
$this->flash->success('Данные успешно сохранены');
}
}
}
}
示例2: initialize
public function initialize()
{
parent::initialize();
//加载js
$this->assets->addJs('backend/js/nestable/jquery.nestable.min.js');
$this->assets->addJs('backend/mt-js/specialty.js');
}
示例3: initialize
protected function initialize()
{
parent::initialize();
$this->setModel("Permission_group_privilege");
$this->view->breadcrumb_cat = 'Cấu hình phân quyền';
$this->view->action = array("index" => "Xem", "edit" => "Sửa", "add" => "Thêm", "delete" => "Xóa", "status" => "Trạng thái");
}
示例4: initialize
public function initialize()
{
$this->view->setTemplateAfter('main');
$this->view->hdr = 'Заказы';
Tag::setTitle('Orders Panel');
parent::initialize();
}
示例5: initialize
public function initialize()
{
$this->tag->setTitle('全国统一预约挂号平台');
parent::initialize();
$this->assets->addCss('css/slider.css');
$this->assets->addJs('js/power-slider.js');
}
示例6: initialize
public function initialize()
{
parent::initialize();
$this->view->setLayout('train');
//加载js
$this->assets->addJs('backend/mt-js/trateacher.js');
}
示例7: initialize
public function initialize()
{
$this->view->setTemplateAfter('main');
Phalcon\Tag::setTitle('Downloads');
$this->loadCustomTrans("downloads");
parent::initialize();
}
示例8: initialize
public function initialize()
{
parent::initialize();
$this->view->dbs = Db::find();
$this->view->currentDbId = $this->request->get('id');
$this->allowRoles();
}
示例9: initialize
public function initialize()
{
$this->tag->setTitle('View Products');
parent::initialize();
parent::GetSideCategories();
$this->handleVoteButtons();
}
示例10: initialize
public function initialize()
{
// $this->view->setTemplateAfter('main');
Resource::init($this->assets);
Tag::setTitle('Welcome');
parent::initialize();
}
示例11: initialize
public function initialize()
{
parent::initialize();
$this->view->setRenderLevel(View::LEVEL_ACTION_VIEW);
$this->assets->collection('css')->addCss("css/bootstrap.css")->addCss("css/nivo-lightbox.css")->addCss("css/animate.css")->addCss("css/default.css")->addCss("css/font-awesome.css")->addCss("css/style.css")->addCss("css/responsiveness.css")->setTargetPath('css/ugly.css')->join(true)->setTargetUri('css/ugly.css')->addFilter(new Phalcon\Assets\Filters\Cssmin());
$this->assets->collection('js')->addJs("js/jquery.min.js")->addJs("js/jquery-1.11.0.js")->addJs("js/bootstrap.js")->addJs("js/nivo-lightbox.min.js")->addJs("js/skrollr.js")->addJs("js/parallax.js")->addJs("js/wow.min.js")->addJs("js/SmoothScroll.js")->addJs("js/jquery.easing.min.js")->addJs("js/cbpAnimatedHeader.js")->addJs("js/classie.js")->addJs("js/jqBootstrapValidation.js")->addJs("js/contact.js")->addJs("js/main.js")->setTargetPath('js/ugly.js')->join(true)->setTargetUri('js/ugly.js')->addFilter(new Phalcon\Assets\Filters\Jsmin());
}
示例12: initialize
public function initialize()
{
$this->lang = $this->session->get('currentLang');
$this->strings = $this->translation->transl('global', $this->lang);
$this->messages = $this->translation->transl('footer', $this->lang);
parent::initialize();
}
示例13: initialize
public function initialize()
{
parent::initialize();
$this->tag->setTitle('幼儿园,幼教学校库-51升学网');
$this->assets->addCss("fontend/css/school/primary-list.css");
$this->assets->addJs("fontend/js/school_primary_list.js");
}
示例14: initialize
public function initialize()
{
$this->tag->setTitle('Документация');
parent::initialize();
ini_set('display_errors', 0);
ini_set('display_startup_errors', 0);
}
示例15: initialize
/**
* Extend ControllerBase initialize()
*/
public function initialize()
{
parent::initialize();
$this->view->dbs = Db::find();
//list all dbs in the left column
$this->view->currentDbId = $this->request->get('id');
}