当前位置: 首页>>代码示例>>PHP>>正文


PHP ControllerBase类代码示例

本文整理汇总了PHP中ControllerBase的典型用法代码示例。如果您正苦于以下问题:PHP ControllerBase类的具体用法?PHP ControllerBase怎么用?PHP ControllerBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了ControllerBase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: 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

示例2: 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

示例3: __construct

 public function __construct()
 {
     parent::__construct();
     $this->AbaAtiva = 29;
     $this->AbaAtivaMae = 0;
     $this->debug();
 }
开发者ID:andersongimino,项目名称:area51,代码行数:7,代码来源:pareceres.php

示例4: initialize

 public function initialize()
 {
     $this->view->setTemplateAfter('main');
     $this->view->hdr = 'Мастера';
     Tag::setTitle('Makers Panel');
     parent::initialize();
 }
开发者ID:serge2300,项目名称:madeheart,代码行数:7,代码来源:MakerslistController.php

示例5:

 function __construct($app, $db, array $data = NULL)
 {
     parent::__construct($app, $db, $data);
     $this->showErrorPage = FALSE;
     $this->actions = ['fetch', 'upload', 'delete', 'descript'];
     $this->validateRights([USER_REGISTERED]);
 }
开发者ID:shevtsov-s,项目名称:planetsbook,代码行数:7,代码来源:StorageController.php

示例6: initialize

 public function initialize()
 {
     $this->view->setTemplateAfter('main');
     Phalcon\Tag::setTitle('Hypertext Preprocesor');
     $this->loadCustomTrans('index');
     parent::initialize();
 }
开发者ID:kjmtrue,项目名称:php-site,代码行数:7,代码来源:IndexController.php

示例7: __construct

 public function __construct($wpdb)
 {
     parent::__construct($wpdb);
     $db = new \Tabulate\DB\Database($this->wpdb);
     $this->table_names = $db->getTableNames();
     $this->template = new \Tabulate\Template('grants.html');
 }
开发者ID:tabulate,项目名称:tabulate3,代码行数:7,代码来源:GrantsController.php

示例8: 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

示例9:

 function __construct($app, $db, array $data = NULL)
 {
     parent::__construct($app, $db, $data);
     $this->showErrorPage = FALSE;
     $this->useTransactions = FALSE;
     $this->actions = ['search'];
 }
开发者ID:shevtsov-s,项目名称:planetsbook,代码行数:7,代码来源:SearchController.php

示例10: 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

示例11: 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

示例12: searchAction

 /**
  * Searches for operadora
  */
 public function searchAction($yacimientoId = null)
 {
     parent::importarJsTable();
     $numberPage = 1;
     if ($yacimientoId != null) {
         $operadora = Operadora::find(array('operadora_yacimientoId=:yacimiento_id:', 'bind' => array('yacimiento_id' => $yacimientoId)));
     } else {
         if ($this->request->isPost()) {
             $query = Criteria::fromInput($this->di, "Operadora", $_POST);
             $this->persistent->parameters = $query->getParams();
         } else {
             $numberPage = $this->request->getQuery("page", "int");
         }
         $parameters = $this->persistent->parameters;
         if (!is_array($parameters)) {
             $parameters = array();
         }
         $parameters["order"] = "operadora_id";
         $operadora = Operadora::find($parameters);
     }
     if (count($operadora) == 0) {
         $this->flash->notice("No se han encontrado resultados");
         return $this->dispatcher->forward(array("controller" => "operadora", "action" => "index"));
     }
     $paginator = new Paginator(array("data" => $operadora, "limit" => 25, "page" => $numberPage));
     $this->view->page = $paginator->getPaginate();
 }
开发者ID:munozdaniel,项目名称:sya,代码行数:30,代码来源:OperadoraController.php

示例13: 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

示例14: 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

示例15: searchAction

 /**
  * Buscando las planillas.
  * SI el usuario tiene rol de administrador podra ver todas las planillas.
  * Sino se veran las Habilitadas unicamente
  */
 public function searchAction()
 {
     parent::importarJsTable();
     $numberPage = 1;
     if ($this->request->isPost()) {
         $query = Criteria::fromInput($this->di, "Planilla", $_POST);
         $this->persistent->parameters = $query->getParams();
     } else {
         $numberPage = $this->request->getQuery("page", "int");
     }
     $parameters = $this->persistent->parameters;
     if (!is_array($parameters)) {
         $parameters = array();
     }
     $parameters["order"] = "planilla_id DESC";
     $planilla = Planilla::find($parameters);
     if (count($planilla) == 0) {
         $this->flash->notice("No se encontraron resultados");
         return $this->dispatcher->forward(array("controller" => "planilla", "action" => "index"));
     }
     $paginator = new Paginator(array("data" => $planilla, "limit" => 10000, "page" => $numberPage));
     $this->view->page = $paginator->getPaginate();
     $miSesion = $this->session->get('auth');
     if ($miSesion['rol_nombre'] == 'ADMIN') {
         $this->view->admin = 1;
     } else {
         $this->view->admin = 0;
     }
 }
开发者ID:munozdaniel,项目名称:sya,代码行数:34,代码来源:PlanillaController.php


注:本文中的ControllerBase类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。