src/Entity/ShippingAddress.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Validator\Address as ValidAddress;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity
  7.  *
  8.  * @ValidAddress(groups="profile")
  9.  */
  10. class ShippingAddress extends Address
  11. {
  12.     /**
  13.      * @ORM\ManyToOne(targetEntity="ProUser", inversedBy="shippingAddresses", cascade={"persist"})
  14.      */
  15.     private $user;
  16.     public function getUser()
  17.     {
  18.         return $this->user;
  19.     }
  20.     public function setUser($user)
  21.     {
  22.         $this->user $user;
  23.         return $this;
  24.     }
  25. }