Пример #1
0
 /**
  * Edit an entry
  *
  * @param   mixed  $row
  * @return  void
  */
 public function editTask($row = null)
 {
     Request::setVar('hidemainmenu', 1);
     if (!is_object($row)) {
         $id = Request::getVar('id', array(0));
         if (is_array($id)) {
             $id = !empty($id) ? intval($id[0]) : 0;
         }
         // load infor from database
         $row = new Service($this->database);
         $row->load($id);
     }
     $this->view->row = $row;
     // Set any errors
     if ($this->getError()) {
         $this->view->setError($this->getError());
     }
     // Output the HTML
     $this->view->setLayout('edit')->display();
 }