當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。