/**
  * A form for updating the SLA times for all categories at once
  */
 public function sla()
 {
     $this->template->setFilename('backend');
     if (isset($_POST['categories'])) {
         try {
             foreach ($_POST['categories'] as $id => $post) {
                 $category = new Category($id);
                 $category->setSlaDays($post['slaDays']);
                 $category->save();
             }
             header('Location: ' . BASE_URL . '/categories');
             exit;
         } catch (\Exception $e) {
             $_SESSION['errorMessages'][] = $e;
         }
     }
     $t = new CategoryTable();
     $list = $t->find();
     $this->template->blocks[] = new Block('categories/slaForm.inc', ['categoryList' => $list]);
 }