getById() 공개 정적인 메소드

public static getById ( $id ) : Item
$id
리턴 Item
예제 #1
0
 /**
  * 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));
 }