<?php/** * Created by PhpStorm. * User: lisavandaele * Date: 30/01/15 * Time: 12:53 */namespace Notaris\AdminBundle\Entity;use Doctrine\ORM\Mapping as ORM;use Gedmo\Mapping\Annotation as Gedmo;use Symfony\Component\Validator\Constraints as Assert;/** * @ORM\Entity(repositoryClass="AssetLinkRepository") * @ORM\Table(name="asset_link") */class AssetLink { /** * @var integer * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ private $id; /** * @ORM\ManyToOne(targetEntity="Notaris\AdminBundle\Entity\Asset", inversedBy="assetLinks") * @ORM\JoinColumn(name="asset_id", referencedColumnName="id", onDelete="CASCADE") */ private $asset; /** * @ORM\ManyToOne(targetEntity="Notaris\AdminBundle\Entity\Link") * @ORM\JoinColumn(name="link_id", referencedColumnName="id", onDelete="CASCADE") */ private $link; /** * @var integer * * @ORM\Column(type="integer") */ private $position = 0; /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Set position * * @param integer $position * @return AssetLink */ public function setPosition($position) { $this->position = $position; return $this; } /** * Get position * * @return integer */ public function getPosition() { return $this->position; } /** * Set asset * * @param \Notaris\AdminBundle\Entity\Asset $asset * @return AssetLink */ public function setAsset(\Notaris\AdminBundle\Entity\Asset $asset = null) { $this->asset = $asset; return $this; } /** * Get asset * * @return \Notaris\AdminBundle\Entity\Asset */ public function getAsset() { return $this->asset; } /** * Set link * * @param \Notaris\AdminBundle\Entity\Link $link * @return AssetLink */ public function setLink(\Notaris\AdminBundle\Entity\Link $link = null) { $this->link = $link; return $this; } /** * Get link * * @return \Notaris\AdminBundle\Entity\Link */ public function getLink() { return $this->link; }}