本文整理汇总了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();
}
示例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();
}
示例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', '');
}
示例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');
}
示例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');
}
示例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')]);
}
示例7: beforeroute
public function beforeroute()
{
parent::beforeroute();
$this->metaManager = \models\meta\Meta::getInstance();
$this->tableMeta = $this->metaManager->getTableMeta($this->fw->get('PARAMS.table'));
}