public function __construct() { $departmentList = DepartmentModel::getList(); $tree = array(); $this->mkTree($departmentList, $tree); $this->assign('departmentList', $tree); parent::__construct(); }
protected function _departmentList() { if (!$this->departmentList) { $departmentList = DepartmentModel::getList(); $tree = array(); mkTree($departmentList, $tree); $this->departmentList = $tree; } return $this->departmentList; }
public function __construct() { parent::__construct(); $departmentList = DepartmentModel::getList(); $tree = array(); if ($this->userInfo['group']['permission']['type'] == 'super') { $this->mkTree($departmentList, $tree); } else { $this->mkTree($departmentList, $tree, $this->userInfo['department_id']); } $this->departmentList = $tree; $this->assign('departmentList', $tree); }
public function __construct() { $survey = (require_once GLOFT_PATH . 'conf/survey.php'); $this->assign('survey', $survey); parent::__construct(); $departmentList = DepartmentModel::getList(); $tree = array(); if ($this->userInfo['group']['permission']['type'] == 'super') { $this->mkTree($departmentList, $tree); } else { $this->mkTree($departmentList, $tree, $this->userInfo['department_id']); } $this->departmentList = $tree; $this->assign('departmentList', $tree); }
public function __construct() { $groupList = UsergroupModel::getList(); $tmp = array(); if ($groupList) { foreach ($groupList as $group) { $tmp[$group['id']] = $group; } } $groupList = $tmp; $departmentList = DepartmentModel::getList(); $tmp = array(); $this->mkTree($departmentList, $tmp); $this->assign('groupList', $groupList); $this->assign('departmentList', $tmp); parent::__construct(); }