StorageLocationImage.php (1131B)
1 <?php 2 3 namespace PartKeepr\StorageLocationBundle\Entity; 4 5 use Doctrine\ORM\Mapping as ORM; 6 use PartKeepr\ImageBundle\Entity\Image; 7 8 /** 9 * Holds a storage location image. 10 * 11 * @ORM\Entity 12 **/ 13 class StorageLocationImage extends Image 14 { 15 /** 16 * The storage location object. 17 * 18 * @ORM\OneToOne(targetEntity="PartKeepr\StorageLocationBundle\Entity\StorageLocation",inversedBy="image") 19 * 20 * @var StorageLocation 21 */ 22 private $storageLocation = null; 23 24 /** 25 * Creates a new storage location image instance. 26 */ 27 public function __construct() 28 { 29 parent::__construct(Image::IMAGE_STORAGELOCATION); 30 } 31 32 /** 33 * Sets the storage location. 34 * 35 * @param StorageLocation $storageLocation The storage location to set 36 */ 37 public function setStorageLocation(StorageLocation $storageLocation) 38 { 39 $this->storageLocation = $storageLocation; 40 } 41 42 /** 43 * Returns the storage location. 44 * 45 * @return StorageLocation the storage location 46 */ 47 public function getStorageLocation() 48 { 49 return $this->storageLocation; 50 } 51 }