src/Notaris/AdminBundle/Entity/Asset.php line 18

Open in your IDE?
  1. <?php
  2. /**
  3.  * Created by PhpStorm.
  4.  * User: lisavandaele
  5.  * Date: 30/01/15
  6.  * Time: 12:53
  7.  */
  8. namespace Notaris\AdminBundle\Entity;
  9. use Doctrine\ORM\Mapping as ORM;
  10. use Gedmo\Mapping\Annotation as Gedmo;
  11. /**
  12.  * @ORM\Entity(repositoryClass="AssetRepository")
  13.  * @ORM\Table(name="asset")
  14.  */
  15. class Asset {
  16.     /**
  17.      * @var integer
  18.      *
  19.      * @ORM\Column(name="id", type="integer")
  20.      * @ORM\Id
  21.      * @ORM\GeneratedValue(strategy="AUTO")
  22.      */
  23.     private $id;
  24.     /**
  25.      * @ORM\OneToMany(targetEntity="AssetImage", mappedBy="asset")
  26.      * @ORM\OrderBy({"position" = "asc"})
  27.      */
  28.     protected $assetImages;
  29.     /**
  30.      * @ORM\OneToMany(targetEntity="AssetAttachment", mappedBy="asset")
  31.      * @ORM\OrderBy({"position" = "asc"})
  32.      */
  33.     protected $assetAttachments;
  34.     /**
  35.      * @ORM\OneToMany(targetEntity="AssetLink", mappedBy="asset")
  36.      * @ORM\OrderBy({"position" = "asc"})
  37.      */
  38.     protected $assetLinks;
  39.     /**
  40.      * @ORM\OneToMany(targetEntity="AssetVideoPath", mappedBy="asset")
  41.      * @ORM\OrderBy({"position" = "asc"})
  42.      */
  43.     protected $assetVideoPaths;
  44.     /**
  45.      * Constructor
  46.      */
  47.     public function __construct()
  48.     {
  49.     }
  50.     /**
  51.      * Get id
  52.      *
  53.      * @return integer 
  54.      */
  55.     public function getId()
  56.     {
  57.         return $this->id;
  58.     }
  59.     /**
  60.      * Add assetImages
  61.      *
  62.      * @param \Notaris\AdminBundle\Entity\AssetImage $assetImages
  63.      * @return Asset
  64.      */
  65.     public function addAssetImage(\Notaris\AdminBundle\Entity\AssetImage $assetImages)
  66.     {
  67.         $this->assetImages[] = $assetImages;
  68.         return $this;
  69.     }
  70.     /**
  71.      * Remove assetImages
  72.      *
  73.      * @param \Notaris\AdminBundle\Entity\AssetImage $assetImages
  74.      */
  75.     public function removeAssetImage(\Notaris\AdminBundle\Entity\AssetImage $assetImages)
  76.     {
  77.         $this->assetImages->removeElement($assetImages);
  78.     }
  79.     /**
  80.      * Get assetImages
  81.      *
  82.      * @return \Doctrine\Common\Collections\Collection 
  83.      */
  84.     public function getAssetImages()
  85.     {
  86.         return $this->assetImages;
  87.     }
  88.     /**
  89.      * Add assetAttachments
  90.      *
  91.      * @param \Notaris\AdminBundle\Entity\AssetAttachment $assetAttachments
  92.      * @return Asset
  93.      */
  94.     public function addAssetAttachment(\Notaris\AdminBundle\Entity\AssetAttachment $assetAttachments)
  95.     {
  96.         $this->assetAttachments[] = $assetAttachments;
  97.         return $this;
  98.     }
  99.     /**
  100.      * Remove assetAttachments
  101.      *
  102.      * @param \Notaris\AdminBundle\Entity\AssetAttachment $assetAttachments
  103.      */
  104.     public function removeAssetAttachment(\Notaris\AdminBundle\Entity\AssetAttachment $assetAttachments)
  105.     {
  106.         $this->assetAttachments->removeElement($assetAttachments);
  107.     }
  108.     /**
  109.      * Get assetAttachments
  110.      *
  111.      * @return \Doctrine\Common\Collections\Collection 
  112.      */
  113.     public function getAssetAttachments()
  114.     {
  115.         return $this->assetAttachments;
  116.     }
  117.     /**
  118.      * Add assetLinks
  119.      *
  120.      * @param \Notaris\AdminBundle\Entity\AssetLink $assetLinks
  121.      * @return Asset
  122.      */
  123.     public function addAssetLink(\Notaris\AdminBundle\Entity\AssetLink $assetLinks)
  124.     {
  125.         $this->assetLinks[] = $assetLinks;
  126.         return $this;
  127.     }
  128.     /**
  129.      * Remove assetLinks
  130.      *
  131.      * @param \Notaris\AdminBundle\Entity\AssetLink $assetLinks
  132.      */
  133.     public function removeAssetLink(\Notaris\AdminBundle\Entity\AssetLink $assetLinks)
  134.     {
  135.         $this->assetLinks->removeElement($assetLinks);
  136.     }
  137.     /**
  138.      * Get assetLinks
  139.      *
  140.      * @return \Doctrine\Common\Collections\Collection 
  141.      */
  142.     public function getAssetLinks()
  143.     {
  144.         return $this->assetLinks;
  145.     }
  146.     /**
  147.      * Add assetVideoPaths
  148.      *
  149.      * @param \Notaris\AdminBundle\Entity\AssetVideoPath $assetVideoPaths
  150.      * @return Asset
  151.      */
  152.     public function addAssetVideoPath(\Notaris\AdminBundle\Entity\AssetVideoPath $assetVideoPaths)
  153.     {
  154.         $this->assetVideoPaths[] = $assetVideoPaths;
  155.         return $this;
  156.     }
  157.     /**
  158.      * Remove assetVideoPaths
  159.      *
  160.      * @param \Notaris\AdminBundle\Entity\AssetVideoPath $assetVideoPaths
  161.      */
  162.     public function removeAssetVideoPath(\Notaris\AdminBundle\Entity\AssetVideoPath $assetVideoPaths)
  163.     {
  164.         $this->assetVideoPaths->removeElement($assetVideoPaths);
  165.     }
  166.     /**
  167.      * Get assetVideoPaths
  168.      *
  169.      * @return \Doctrine\Common\Collections\Collection 
  170.      */
  171.     public function getAssetVideoPaths()
  172.     {
  173.         return $this->assetVideoPaths;
  174.     }
  175. }