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


PHP Backend::beforeroute方法代码示例

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


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

示例1: beforeroute

 public function beforeroute()
 {
     $this->table = $this->fw->get('PARAMS.table');
     if (!\models\meta\Meta::getInstance()->exists($this->table)) {
         $this->fw->error(404);
     }
     $this->tableMeta = \models\meta\Meta::getInstance()->getTableMeta($this->table);
     //		Для типов контента, которые завияст от других, должен быть передан ID родительского объекта
     //		$this->meta_all = \models\ContentMeta::getMetaAll();
     //		$this->meta = $this->meta_all[$this->table];
     //		foreach ($this->meta_all as $meta) {
     //			if ($meta['depend'] == $this->table) {
     //				$this->dependants[] = $meta['type'];
     //			}
     //		}
     $class = $this->modelClass;
     $this->model = $class::getInstance($this->table);
     if ($this->tableMeta->isTree()) {
         $this->setPid();
     }
     if ($this->fw->get('use_app_routes')) {
         $this->fw->mset(array('ctrl_base' => $this->fw->get('app_backend_base.content'), 'core_ctrl_base' => $this->fw->get('app_backend_base.content_core')));
     } else {
         $this->fw->mset(array('ctrl_base' => $this->fw->get('backend_base.content'), 'core_ctrl_base' => $this->fw->get('backend_base.content_core')));
     }
     $this->fw->set('valid_items', $this->tableMeta->get('items'));
     parent::beforeroute();
     $this->setOwnerId();
 }
开发者ID:k-kalashnikov,项目名称:forKoda,代码行数:29,代码来源:content.php

示例2: beforeroute

 public function beforeroute()
 {
     parent::beforeroute();
     $this->table = $this->fw->get('PARAMS.table');
     $this->fw->copy('backend_base.meta', 'ctrl_base');
     $this->meta = \models\meta\Meta::getInstance();
 }
开发者ID:k-kalashnikov,项目名称:forKoda,代码行数:7,代码来源:meta.php

示例3: beforeroute

 public function beforeroute()
 {
     parent::beforeroute();
     $this->fw->set('ctrl_slug', '/account/comment');
     $this->fw->set('pagination_slug', '/account/comments');
     $this->list_first_page_slug = 'account/comments';
     $this->fw->set('table_slug', '');
 }
开发者ID:k-kalashnikov,项目名称:forKoda,代码行数:8,代码来源:comments.php

示例4: beforeroute

 public function beforeroute()
 {
     $this->model = \models\UserGroup::getInstance();
     parent::beforeroute();
     $this->table = 'groups';
     $this->fw->mset(['ctrl_base' => $this->fw->get('backend_base.group'), 'core_ctrl_base' => $this->fw->get('backend_base.group_core')]);
     $default_group = $this->model->getDefaultGroup();
     $this->fw->set('default_group', $default_group);
     $this->fw->set('no_bulk', 'true');
 }
开发者ID:k-kalashnikov,项目名称:forKoda,代码行数:10,代码来源:group.php

示例5: beforeroute

 public function beforeroute()
 {
     $this->model = \models\ACL::getInstance();
     parent::beforeroute();
     $this->fw->set('PARAMS.table', 'acl');
     // Для корректной работы именованных маршрутов
     $this->table = 'acl';
     $this->owner_id = $this->fw->get('account.user.id');
     $this->fw->set('ctrl_base', $this->fw->get('backend_base.acl'));
     $this->fw->set('no_bulk', 'true');
 }
开发者ID:k-kalashnikov,项目名称:forKoda,代码行数:11,代码来源:acl.php

示例6: beforeroute

 public function beforeroute()
 {
     $this->model = \models\User::getInstance();
     parent::beforeroute();
     $this->fw->mset(['PARAMS.table' => 'user', 'ctrl_base' => $this->fw->get('backend_base.user'), 'core_ctrl_base' => $this->fw->get('backend_base.user_core')]);
 }
开发者ID:k-kalashnikov,项目名称:forKoda,代码行数:6,代码来源:user.php

示例7: beforeroute

 public function beforeroute()
 {
     parent::beforeroute();
     $this->metaManager = \models\meta\Meta::getInstance();
     $this->tableMeta = $this->metaManager->getTableMeta($this->fw->get('PARAMS.table'));
 }
开发者ID:k-kalashnikov,项目名称:forKoda,代码行数:6,代码来源:relations.php


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