Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace AppBundle\Entity;
- use Doctrine\ORM\Mapping as ORM;
- use Doctrine\Common\Collections\ArrayCollection;
- /**
- * Appareil
- *
- * @ORM\Table()
- * @ORM\Entity
- */
- class Appareil
- { /**
- * @ORM\ManyToOne(targetEntity="Combustible" , inversedBy="Appareil")
- * @ORM\JoinColumn(name="combustibles",referencedColumnName="id")
- */
- private $combustibles;
- public function addCombustible(Combustible $combustible)
- {
- if (!$this->combustible->contains($combustible)) {
- $this->combustible->add($combustible);
- }
- }
- public function __toString() {
- return $this->name;
- }
- /**
- * Set combustibles
- *
- * @param \AppBundle\Entity\Combustible $combustibles
- * @return Appareil
- */
- public function setCombustibles( $combustibles = null)
- {
- $this->combustibles[] = $combustibles;
- return $this;
- }
- /**
- * Get combustibles
- *
- * @return \AppBundle\Entity\Combustible
- */
- public function getCombustibles()
- {
- return $this->combustibles;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement