public function deleteAction($id = false)
 {
     $this->permission('delete');
     if (!$id) {
         return Brightery::error404();
     }
     $pm_issue_statues = new \modules\pm\models\Pm_issue_statues();
     $pm_issue_statues->pm_issue_statues_id = $id;
     if ($pm_issue_statues->delete()) {
         Uri_helper::redirect("management/pm_issue_statues");
     }
 }
 public function indexAction($offset = 0)
 {
     $this->permission('index');
     $this->load->library('pagination');
     $pm_issues = new \modules\pm\models\Pm_issues();
     $pm_issues->_select = "pm_issue_id, title, pm_issue_statues_id";
     $pm_issue_statues = new \modules\pm\models\Pm_issue_statues();
     $pm_issue_statues->_select = "pm_issue_statues_id, title, color";
     $pm_issue_statues->_limit = $this->config->get('limit');
     $pm_issue_statues->_offset = $offset;
     return $this->render('pm_sticky_issues/index', ['items' => $pm_issue_statues->get(), 'issues' => $pm_issues->get(), 'issue_model' => $pm_issues, 'pagination' => $this->Pagination->generate(['url' => Uri_helper::url('management/pm_sticky_issues/index'), 'total' => $pm_issue_statues->get(true), 'limit' => $pm_issue_statues->_limit, 'offset' => $pm_issue_statues->_offset])]);
 }