UserProvider.php (1304B)
1 <?php 2 3 namespace PartKeepr\AuthBundle\Entity; 4 5 use Doctrine\ORM\Mapping as ORM; 6 use PartKeepr\CoreBundle\Entity\BaseEntity; 7 use PartKeepr\DoctrineReflectionBundle\Annotation\TargetService; 8 use Symfony\Component\Serializer\Annotation\Groups; 9 10 /** 11 * @ORM\Entity 12 * @ORM\Table( 13 * name="UserProvider", 14 * uniqueConstraints={@ORM\UniqueConstraint(name="type", columns={"type"})}) 15 * @TargetService(uri="/api/user_providers") 16 */ 17 class UserProvider extends BaseEntity 18 { 19 /** 20 * @ORM\Column(type="string", length=255) 21 * @Groups({"default"}) 22 * 23 * @var string 24 */ 25 private $type; 26 27 /** 28 * @ORM\Column(type="boolean") 29 * @Groups({"default"}) 30 * 31 * @var bool 32 */ 33 private $editable; 34 35 public function __construct() 36 { 37 $this->setEditable(true); 38 } 39 40 /** 41 * @return mixed 42 */ 43 public function isEditable() 44 { 45 return $this->editable; 46 } 47 48 /** 49 * @param mixed $editable 50 */ 51 public function setEditable($editable) 52 { 53 $this->editable = $editable; 54 } 55 56 /** 57 * @return string 58 */ 59 public function getType() 60 { 61 return $this->type; 62 } 63 64 /** 65 * @param string $type 66 */ 67 public function setType($type) 68 { 69 $this->type = $type; 70 } 71 }