1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
<?php
namespace hji\users\admin\controllers;
use hji\users\admin\BaseController as BaseAdminController;
use hji\users\admin\models\ActionsPageModel;
use hji\users\Users;
class ActionsPageController extends BaseAdminController
{
protected $model;
protected $settingsModel;
public function __construct(ActionsPageModel $pageViewModel)
{
$this->model = $pageViewModel;
$this->view = $this->di()->create('hji\common\utils\Views', array(Users::$dir . '/classes/views'));
$this->template = 'admin-page';
}
public function renderPage()
{
$this->model->setParameters($this->prepareActionsModelParameters());
$actionsView = clone($this->view);
$vars['table'] = $this->model->getTable();
$vars['title'] = $this->model->getTitle();
$vars['subTitle'] = $this->model->getSubtitle();
$vars['filters'] = $this->model->getFilters();
$vars['pageModel'] = $this->model;
$vars['pageTitle'] = $this->model->getPageTitle();
$vars['tabs'] = $this->model->getTabs();
$vars['pageSlug'] = $this->model->getPageSlug();
$vars['notices'] = $this->model->getNotices();
$vars['pageContent'] = $actionsView->render('admin-user-actions', $vars);
echo $this->view->render($this->template, $vars);
}
}