當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ControllerBase::initialize方法代碼示例

本文整理匯總了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('Данные успешно сохранены');
             }
         }
     }
 }
開發者ID:Altairko,項目名稱:REA,代碼行數:33,代碼來源:CatalogController.php

示例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');
 }
開發者ID:xw716825,項目名稱:git_back,代碼行數:7,代碼來源:SpecialtyController.php

示例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");
 }
開發者ID:quyquoc,項目名稱:rmt-studio.com,代碼行數:7,代碼來源:GroupPrivilegeController.php

示例4: initialize

 public function initialize()
 {
     $this->view->setTemplateAfter('main');
     $this->view->hdr = 'Заказы';
     Tag::setTitle('Orders Panel');
     parent::initialize();
 }
開發者ID:serge2300,項目名稱:madeheart,代碼行數:7,代碼來源:OrdersController.php

示例5: initialize

 public function initialize()
 {
     $this->tag->setTitle('全國統一預約掛號平台');
     parent::initialize();
     $this->assets->addCss('css/slider.css');
     $this->assets->addJs('js/power-slider.js');
 }
開發者ID:sify21,項目名稱:guahao,代碼行數:7,代碼來源:IndexController.php

示例6: initialize

 public function initialize()
 {
     parent::initialize();
     $this->view->setLayout('train');
     //加載js
     $this->assets->addJs('backend/mt-js/trateacher.js');
 }
開發者ID:xw716825,項目名稱:git_back,代碼行數:7,代碼來源:TrateacherController.php

示例7: initialize

 public function initialize()
 {
     $this->view->setTemplateAfter('main');
     Phalcon\Tag::setTitle('Downloads');
     $this->loadCustomTrans("downloads");
     parent::initialize();
 }
開發者ID:kjmtrue,項目名稱:php-site,代碼行數:7,代碼來源:DownloadsController.php

示例8: initialize

 public function initialize()
 {
     parent::initialize();
     $this->view->dbs = Db::find();
     $this->view->currentDbId = $this->request->get('id');
     $this->allowRoles();
 }
開發者ID:mpetcu,項目名稱:lime-juice,代碼行數:7,代碼來源:DbController.php

示例9: initialize

 public function initialize()
 {
     $this->tag->setTitle('View Products');
     parent::initialize();
     parent::GetSideCategories();
     $this->handleVoteButtons();
 }
開發者ID:RafalPydyniak,項目名稱:OceniarkaPHP,代碼行數:7,代碼來源:ProductController.php

示例10: initialize

 public function initialize()
 {
     // $this->view->setTemplateAfter('main');
     Resource::init($this->assets);
     Tag::setTitle('Welcome');
     parent::initialize();
 }
開發者ID:hyfjjjj,項目名稱:HHA-Web,代碼行數:7,代碼來源:IndexController.php

示例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());
 }
開發者ID:asgvard,項目名稱:photo-oleg-v,代碼行數:7,代碼來源:IndexController.php

示例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();
 }
開發者ID:serge2300,項目名稱:madeheart,代碼行數:7,代碼來源:MailController.php

示例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");
 }
開發者ID:xw716825,項目名稱:git_back,代碼行數:7,代碼來源:ChildController.php

示例14: initialize

 public function initialize()
 {
     $this->tag->setTitle('Документация');
     parent::initialize();
     ini_set('display_errors', 0);
     ini_set('display_startup_errors', 0);
 }
開發者ID:groumand,項目名稱:restAPI-php-phalcon,代碼行數:7,代碼來源:ApiController.php

示例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');
 }
開發者ID:mpetcu,項目名稱:lime-juice,代碼行數:10,代碼來源:ReportController.php


注:本文中的ControllerBase::initialize方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。