Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // src/Dessin/PlanBundle/Entity/Notice.php
- namespace Dessin\PlanBundle\Entity;
- use Doctrine\DBAL\Types\StringType;
- use Doctrine\DBAL\Types\IntegerType;
- use Doctrine\DBAL\Types\BooleanType;
- use Doctrine\ORM\Mapping as ORM;
- use Doctrine\Common\Collections\ArrayCollection;
- use Symfony\Bridge\Doctrine\Validator\Constraints as DoctrineAssert;
- use Dessin\ProfileBundle\Entity\Profile;
- /**
- * @ORM\Entity
- * @ORM\Table(name="Notice")
- * @ORM\HasLifecycleCallbacks
- * @DoctrineAssert\UniqueEntity("name")
- */
- class Notice
- {
- /**
- * @ORM\Id
- * @ORM\Column(type="integer")
- * @ORM\GeneratedValue(strategy="AUTO")
- *
- * @var integer $id
- */
- protected $id;
- /**
- * @ORM\Column(type="string")
- *
- * @var string name
- */
- protected $name;
- /**
- * @ORM\Column(type="string")
- *
- * @var string text
- */
- protected $text;
- //* @ORM\OneToMany(targetEntity="Frame", mappedBy="notice", cascade={"persist","remove"})
- /**
- * @ORM\OneToMany(targetEntity="Frame", mappedBy="notice")
- *
- */
- protected $frames;
- /*
- /**
- * @ORM\ManyToOne(targetEntity="Dessin\ProfileBundle\Entity\Profile", inversedBy="notices")
- * @ORM\JoinColumn(name="profile_id", referencedColumnName="id")
- *
- */
- /*protected $profile;*/
- /**
- * Get id
- *
- * @return integer
- */
- public function getId()
- {
- return $this->id;
- }
- /**
- * Set name
- *
- * @param string $name
- */
- public function setName($name)
- {
- $this->name = $name;
- }
- /**
- * Get name
- *
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
- /**
- * Set text
- *
- * @param string $text
- */
- public function setText($text)
- {
- $this->text = $text;
- }
- /**
- * Get text
- *
- * @return string
- */
- public function getText()
- {
- return $this->text;
- }
- public function __toString(){
- return $this->getName();
- }
- public function __construct()
- {
- $this->frames = new \Doctrine\Common\Collections\ArrayCollection();
- }
- /**
- * Add frames
- *
- * @param Dessin\PlanBundle\Entity\Frame $frames
- */
- public function addFrame(\Dessin\PlanBundle\Entity\Frame $frames)
- {
- $this->frames[] = $frames;
- }
- /**
- * Get frames
- *
- * @return Doctrine\Common\Collections\Collection
- */
- public function getFrames()
- {
- return $this->frames;
- }
- /*
- /**
- * Set profile
- *
- * @param Dessin\ProfileBundle\Entity\Profile $profile
- */
- /*public function setProfile(\Dessin\ProfileBundle\Entity\Profile $profile)
- {
- $this->profile = $profile;
- }*/
- /*
- /**
- * Get profile
- *
- * @return Dessin\ProfileBundle\Entity\Profile
- */
- /*public function getProfile()
- {
- return $this->profile;
- }*/
- /*
- /**
- * @ORM\PreRemove
- */
- /* public function preRemove() {
- }*/
- }
Advertisement
Add Comment
Please, Sign In to add comment