/** * Loads a list of static routes for the specicifies parameters, returns an array of Staticroute elements * * @return array */ public function load() { $itemsData = $this->db->fetchAll("SELECT id FROM recyclebin" . $this->getCondition() . $this->getOrder() . $this->getOffsetLimit(), $this->model->getConditionVariables()); $items = array(); foreach ($itemsData as $itemData) { $items[] = Element_Recyclebin_Item::getById($itemData["id"]); } $this->model->setItems($items); return $items; }
public function restoreAction() { $item = Element_Recyclebin_Item::getById($this->_getParam("id")); $item->restore(); $this->_helper->json(array("success" => true)); }