45 lines
1.1 KiB
PHP
45 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace Hura8\Components\Staff\AdminController;
|
|
|
|
use Hura8\Components\Staff\Model\StaffDepartmentModel;
|
|
use Hura8\Interfaces\AppResponse;
|
|
use Hura8\Traits\ClassCacheTrait;
|
|
|
|
|
|
class StaffAdminDepartmentController
|
|
{
|
|
use ClassCacheTrait;
|
|
|
|
protected $objStaffDepartmentModel;
|
|
|
|
|
|
public function __construct() {
|
|
$this->objStaffDepartmentModel = new StaffDepartmentModel();
|
|
}
|
|
|
|
public function getList(array $conditions) {
|
|
return $this->objStaffDepartmentModel->getList($conditions);
|
|
}
|
|
|
|
public function getInfo($id) {
|
|
return self::getCache("getInfo-".$id, function () use ($id){
|
|
return $this->objStaffDepartmentModel->getInfo($id);
|
|
});
|
|
}
|
|
|
|
public function getEmptyInfo(array $additional_fields = [])
|
|
{
|
|
return $this->objStaffDepartmentModel->getEmptyInfo($additional_fields);
|
|
}
|
|
|
|
public function update($id, array $input_info) {
|
|
return $this->objStaffDepartmentModel->update($id, $input_info);
|
|
}
|
|
|
|
public function create(array $input_info) {
|
|
return $this->objStaffDepartmentModel->create($input_info);
|
|
}
|
|
|
|
}
|