src/Entity/Extranet/OrganigramNode.php line 27

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Extranet;
  3. use App\Annotation\SiteAware;
  4. use App\Entity\AbstractBase;
  5. use App\Entity\Interfaces\ImageInterface;
  6. use App\Entity\Interfaces\SiteInterface;
  7. use App\Entity\Traits\HasImageTrait;
  8. use App\Entity\Traits\SiteTrait;
  9. use App\Entity\User;
  10. use App\Repository\Extranet\OrganigramNodeRepository;
  11. use Doctrine\Common\Collections\ArrayCollection;
  12. use Doctrine\Common\Collections\Collection;
  13. use Doctrine\ORM\Mapping as ORM;
  14. use Gedmo\Mapping\Annotation as Gedmo;
  15. use Symfony\Component\HttpFoundation\File\File;
  16. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  17. /**
  18.  * @ORM\Table(name="vulco_organigram_node", indexes={@ORM\Index(name="organigram_node_site_idx", columns={"site"})})
  19.  * @ORM\Entity(repositoryClass=OrganigramNodeRepository::class)
  20.  * @Gedmo\SoftDeleteable(fieldName="removedAt", timeAware=false)
  21.  * @SiteAware(siteFieldName="site")
  22.  * @Vich\Uploadable
  23.  */
  24. class OrganigramNode extends AbstractBase implements SiteInterfaceImageInterface
  25. {
  26.     use HasImageTrait;
  27.     use SiteTrait;
  28.     /**
  29.      * @ORM\OneToMany(targetEntity="App\Entity\Extranet\OrganigramNode", mappedBy="parent")
  30.      */
  31.     public ?Collection $organigramNodes;
  32.     /**
  33.      * @ORM\ManyToOne(targetEntity="App\Entity\Extranet\OrganigramNode", inversedBy="organigramNodes")
  34.      */
  35.     private ?OrganigramNode $parent null;
  36.     /**
  37.      * @ORM\OneToOne(targetEntity="App\Entity\User")
  38.      */
  39.     private ?User $assessor null;
  40.     /**
  41.      * @Vich\UploadableField(mapping="organigram_node_image", fileNameProperty="imageName")
  42.      */
  43.     private ?File $image null;
  44.     /**
  45.      * @ORM\Column(type="string", nullable=true)
  46.      */
  47.     private ?string $name null;
  48.     /**
  49.      * @ORM\Column(type="string", nullable=true)
  50.      */
  51.     private ?string $position null;
  52.     /**
  53.      * @ORM\Column(type="string", nullable=true)
  54.      */
  55.     private ?string $email null;
  56.     /**
  57.      * @ORM\Column(type="string", nullable=true)
  58.      */
  59.     private ?string $phone null;
  60.     /**
  61.      * @ORM\Column(type="string", nullable=true)
  62.      */
  63.     private ?string $mobile null;
  64.     /**
  65.      * @ORM\Column(type="string", nullable=true)
  66.      */
  67.     private ?string $type null;
  68.     /**
  69.      * @ORM\Column(type="integer")
  70.      */
  71.     private int $nodePosition;
  72.     public function getOrganigramNodes(): ?Collection
  73.     {
  74.         return $this->organigramNodes;
  75.     }
  76.     public function setOrganigramNodes(?Collection $organigramNodes): self
  77.     {
  78.         $this->organigramNodes $organigramNodes;
  79.         return $this;
  80.     }
  81.     public function getParent(): ?OrganigramNode
  82.     {
  83.         return $this->parent;
  84.     }
  85.     public function setParent(?OrganigramNode $parent): self
  86.     {
  87.         $this->parent $parent;
  88.         return $this;
  89.     }
  90.     public function getAssessor(): ?User
  91.     {
  92.         return $this->assessor;
  93.     }
  94.     public function setAssessor(?User $assessor): self
  95.     {
  96.         $this->assessor $assessor;
  97.         return $this;
  98.     }
  99.     public function getName(): ?string
  100.     {
  101.         return $this->name;
  102.     }
  103.     public function setName(?string $name): self
  104.     {
  105.         $this->name $name;
  106.         return $this;
  107.     }
  108.     public function getPosition(): ?string
  109.     {
  110.         return $this->position;
  111.     }
  112.     public function setPosition(?string $position): self
  113.     {
  114.         $this->position $position;
  115.         return $this;
  116.     }
  117.     public function getEmail(): ?string
  118.     {
  119.         return $this->email;
  120.     }
  121.     public function setEmail(?string $email): self
  122.     {
  123.         $this->email $email;
  124.         return $this;
  125.     }
  126.     public function getPhone(): ?string
  127.     {
  128.         return $this->phone;
  129.     }
  130.     public function setPhone(?string $phone): self
  131.     {
  132.         $this->phone $phone;
  133.         return $this;
  134.     }
  135.     public function getMobile(): ?string
  136.     {
  137.         return $this->mobile;
  138.     }
  139.     public function setMobile(?string $mobile): self
  140.     {
  141.         $this->mobile $mobile;
  142.         return $this;
  143.     }
  144.     public function getType(): ?string
  145.     {
  146.         return $this->type;
  147.     }
  148.     public function setType(?string $type): self
  149.     {
  150.         $this->type $type;
  151.         return $this;
  152.     }
  153.     public function getNodePosition(): int
  154.     {
  155.         return $this->nodePosition;
  156.     }
  157.     public function setNodePosition(int $nodePosition): self
  158.     {
  159.         $this->nodePosition $nodePosition;
  160.         return $this;
  161.     }
  162.     public function __construct()
  163.     {
  164.         $this->organigramNodes = new ArrayCollection();
  165.     }
  166. }