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