Pimcore\Model\Element\Recyclebin\Item::getById PHP Method

getById() public static method

public static getById ( $id ) : Item
$id
return Item
    public static function getById($id)
    {
        $item = new self();
        $item->getDao()->getById($id);
        return $item;
    }

Usage Example

コード例 #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;
 }
All Usage Examples Of Pimcore\Model\Element\Recyclebin\Item::getById