Beispiel #1
0
 public static function getItem($type, $itemId)
 {
     if (in_array($type, self::$items)) {
         $item = new Item();
         $item->setType($type);
         $item->setId($itemId);
         return $item;
     }
 }
Beispiel #2
0
 public function getObjectFromItem(Item $item)
 {
     $itemInfo = Item::getItemInfo($item);
     return $this->em->getRepository($itemInfo['repository'])->find($item->getId());
 }