src/Entity/Offer.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\OfferRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Symfony\Component\Serializer\Annotation\Groups;
  9. use Symfony\Component\Serializer\Normalizer\NormalizableInterface;
  10. use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
  11. use Symfony\Component\String\Slugger\AsciiSlugger;
  12. /**
  13.  * @ORM\Entity(repositoryClass=OfferRepository::class)
  14.  * @ORM\HasLifecycleCallbacks()
  15.  */
  16. class Offer implements NormalizableInterface
  17. {
  18.     /**
  19.      * @ORM\Id
  20.      * @ORM\GeneratedValue
  21.      * @ORM\Column(type="integer")
  22.      */
  23.     public $id;
  24.     /**
  25.      * @ORM\Column(type="string", length=255)
  26.      */
  27.     public $title;
  28.     /**
  29.      * @ORM\Column(type="integer", nullable=true)
  30.      */
  31.     private $min_tjm;
  32.     /**
  33.      * @ORM\Column(type="integer", nullable=true)
  34.      */
  35.     private $max_tjm;
  36.     /**
  37.      * @ORM\Column(type="boolean")
  38.      */
  39.     public $open_society true;
  40.     /**
  41.      * @ORM\Column(type="string", length=255, nullable=true)
  42.      */
  43.     private $location;
  44.     /**
  45.      * @ORM\Column(type="text", nullable=true)
  46.      */
  47.     public $description;
  48.     /**
  49.      * @ORM\Column(type="integer", nullable=true)
  50.      */
  51.     private $duration_value;
  52.     /**
  53.      * @ORM\Column(type="string", length=255, nullable=true)
  54.      */
  55.     private $duration_type;
  56.     /**
  57.      * @ORM\Column(type="string", length=255)
  58.      */
  59.     private $mode_remote "Non";
  60.     /**
  61.      * @ORM\Column(type="string", length=255)
  62.      */
  63.     private $year_required;
  64.     /**
  65.      * @ORM\Column(type="boolean", nullable=true)
  66.      */
  67.     private $show_coordinate;
  68.     /**
  69.      * @ORM\ManyToOne(targetEntity=Society::class, inversedBy="offers")
  70.      * @ORM\JoinColumn(nullable=true, onDelete="CASCADE")
  71.      */
  72.     private $society;
  73.     /**
  74.      * @ORM\Column(type="boolean")
  75.      */
  76.     private $renew;
  77.     /**
  78.      * @ORM\Column(type="datetime", nullable=true)
  79.      */
  80.     private $created_at;
  81.     /**
  82.      * @ORM\Column(type="datetime", nullable=true)
  83.      */
  84.     private $expire_at;
  85.     /**
  86.      * @ORM\Column(type="string", length=5, nullable=true)
  87.      */
  88.     private $contact_civility;
  89.     /**
  90.      * @ORM\Column(type="string", length=255, nullable=true)
  91.      */
  92.     private $contact_mail;
  93.     /**
  94.      * @ORM\Column(type="string", length=20, nullable=true)
  95.      */
  96.     private $contact_phone;
  97.     /**
  98.      * @ORM\Column(type="string", length=10, nullable=true)
  99.      */
  100.     private $starting_type;
  101.     /**
  102.      * @ORM\Column(type="date", nullable=true)
  103.      */
  104.     private $startin_date;
  105.     /**
  106.      * @ORM\Column(type="string", length=255, nullable=true)
  107.      */
  108.     private $contact_name;
  109.     /**
  110.      * @ORM\Column(type="json", nullable=true)
  111.      */
  112.     private $questions = [];
  113.     /**
  114.      * @ORM\OneToMany(targetEntity=Candidature::class, mappedBy="offer")
  115.      */
  116.     private $candidatures;
  117.     /**
  118.      * @ORM\Column(type="integer", nullable=true)
  119.      */
  120.     private $view 0;
  121.     /**
  122.      * @ORM\Column(type="integer", nullable=true)
  123.      */
  124.     private $unseenCandidature 0;
  125.     /**
  126.      * @ORM\OneToMany(targetEntity=OfferFavorite::class, mappedBy="offer", orphanRemoval=true)
  127.      */
  128.     private $offerFavorites;
  129.     /**
  130.      * @ORM\Column(type="string", length=155, nullable=true)
  131.      */
  132.     private $ville;
  133.     /**
  134.      * @ORM\Column(type="boolean", nullable=true)
  135.      */
  136.     public $priorize;
  137.     /**
  138.      * @ORM\Column(type="boolean", nullable=true)
  139.      */
  140.     public $weekly;
  141.     /**
  142.      * @ORM\Column(type="boolean", nullable=true)
  143.      */
  144.     public $daily;
  145.     /**
  146.      * @ORM\ManyToOne(targetEntity=User::class)
  147.      */
  148.     private $userRecruteur;
  149.     /**
  150.      * @ORM\Column(type="integer", nullable=true)
  151.      */
  152.     private $civility;
  153.     /**
  154.      * @ORM\Column(type="string", length=50, nullable=true)
  155.      */
  156.     private $typeSearch;
  157.     /**
  158.      * @ORM\Column(type="integer", nullable=true)
  159.      */
  160.     public $salaryPerMonthMin;
  161.     /**
  162.      * @ORM\Column(type="integer", nullable=true)
  163.      */
  164.     public $salaryPerMonthMax;
  165.     /**
  166.      * @ORM\Column(type="integer", nullable=true)
  167.      */
  168.     public $salaryPerHourMin;
  169.     /**
  170.      * @ORM\Column(type="integer", nullable=true)
  171.      */
  172.     public $salaryPerHourMax;
  173.     /**
  174.      * @ORM\Column(type="string", length=50, nullable=true)
  175.      */
  176.     private $societyExternName;
  177.     /**
  178.      * @ORM\Column(type="string", length=255, nullable=true)
  179.      */
  180.     private $linkExtern;
  181.     /**
  182.      * @ORM\Column(type="boolean", nullable=true)
  183.      */
  184.     public $notDraft true;
  185.     /**
  186.      * @ORM\Column(type="datetime", nullable=true)
  187.      */
  188.     private $dateRemonter;
  189.     /**
  190.      * @ORM\Column(type="boolean", nullable=true)
  191.      */
  192.     private $shareOnSocialNetwork false;
  193.     /**
  194.      * @ORM\Column(type="boolean", nullable=true)
  195.      */
  196.     private $bySuperAdmin false;
  197.     /**
  198.      * @ORM\ManyToOne(targetEntity=User::class)
  199.      * @ORM\JoinColumn(nullable=true)
  200.      */
  201.     private ?User $userByAdmin null;
  202.     /**
  203.      * @ORM\Column(type="boolean", nullable=true)
  204.      */
  205.     public $siteMapIndex true;
  206.     /**
  207.      * @ORM\Column(type="string", length=150, nullable=true)
  208.      */
  209.     private $slug null;
  210.     public function __construct()
  211.     {
  212.         $this->candidatures = new ArrayCollection();
  213.         $this->offerFavorites = new ArrayCollection();
  214.         $this->typeSearch "Full-time";
  215.     }
  216.     // ----------------------------------------------------------------
  217.     public function updateSlug(){
  218.         $slugger = new AsciiSlugger();
  219.         $defaultNum 10000;
  220.         $numero $defaultNum $this->getId();
  221.         $slug strtolower($slugger->slug($numero.'-'.$this->getTitle()));
  222.         $this->setSlug($slug);
  223.     }
  224.     public function getSalaryPeerMonthText(){
  225.         if(empty($this->salaryPerMonthMin) && empty($this->salaryPerMonthMax)){
  226.             return 'Depending on profile';
  227.         }
  228.         if(empty($this->salaryPerMonthMin)){
  229.             return 'Max '.$this->salaryPerMonthMax.' AED';
  230.         }
  231.         if(empty($this->salaryPerMonthMax)){
  232.             return 'Min '.$this->salaryPerMonthMin.' AED';
  233.         }
  234.         return $this->salaryPerMonthMin.' - '.$this->salaryPerMonthMax.' AED';
  235.     }
  236.     public function getSalaryPeerHourText(){
  237.         if(empty($this->salaryPerHourMin) && empty($this->salaryPerHourMax)){
  238.             return 'Depending on profile';
  239.         }
  240.         if(empty($this->salaryPerHourMin)){
  241.             return 'Max '.$this->salaryPerHourMax.' AED';
  242.         }
  243.         if(empty($this->salaryPerHourMax)){
  244.             return 'Min '.$this->salaryPerHourMin.' AED';
  245.         }
  246.         return $this->salaryPerHourMin.' - '.$this->salaryPerHourMax.' AED';
  247.     }
  248.     public function getTimeCreateString() {
  249.         $date $this->created_at;
  250.         $today = new \DateTime();
  251.         $interval $today->diff($date);
  252.         if ($interval->days == 0) {
  253.             return 'Posted today';
  254.         } elseif ($interval->days == 1) {
  255.             return 'Posted 1 day ago';
  256.         } elseif ($interval->days >= && $interval->days <= 6) {
  257.             return 'Posted ' $interval->days ' days ago';
  258.         } else {
  259.             return 'Posted on ' $date->format('j M');
  260.         }
  261.     }
  262.     /**
  263.      * @ORM\PrePersist
  264.      */
  265.     public function setCreatedAtAutomatically()
  266.     {
  267.         if ($this->getCreatedAt() === null) {
  268.             $this->setCreatedAt(new \DateTime());
  269.         }
  270.         if ($this->expire_at === null){
  271.             $expire = (new \DateTime())->add(new \DateInterval('P6M'));
  272.             $this->setExpireAt($expire);
  273.         }
  274.     }
  275.     // -----------------------------------------------------------------
  276.     public function getId(): ?int
  277.     {
  278.         return $this->id;
  279.     }
  280.     public function getTitle(): ?string
  281.     {
  282.         return $this->title;
  283.     }
  284.     public function setTitle(string $title): self
  285.     {
  286.         $this->title $title;
  287.         return $this;
  288.     }
  289.     public function getMinTjm(): ?int
  290.     {
  291.         return $this->min_tjm;
  292.     }
  293.     public function setMinTjm(?int $min_tjm): self
  294.     {
  295.         $this->min_tjm $min_tjm;
  296.         return $this;
  297.     }
  298.     public function getMaxTjm(): ?int
  299.     {
  300.         return $this->max_tjm;
  301.     }
  302.     public function setMaxTjm(?int $max_tjm): self
  303.     {
  304.         $this->max_tjm $max_tjm;
  305.         return $this;
  306.     }
  307.     public function getOpenSociety(): ?bool
  308.     {
  309.         return $this->open_society;
  310.     }
  311.     public function setOpenSociety(bool $open_society): self
  312.     {
  313.         $this->open_society $open_society;
  314.         return $this;
  315.     }
  316.     public function getLocation(): ?string
  317.     {
  318.         return $this->location;
  319.     }
  320.     public function setLocation(?string $location): self
  321.     {
  322.         $this->location $location;
  323.         return $this;
  324.     }
  325.     public function getDescription(): ?string
  326.     {
  327.         return $this->description;
  328.     }
  329.     public function setDescription(string $description): self
  330.     {
  331.         $this->description $description;
  332.         return $this;
  333.     }
  334.     public function getModeRemote(): ?string
  335.     {
  336.         return $this->mode_remote;
  337.     }
  338.     public function setModeRemote(string $mode_remote): self
  339.     {
  340.         $this->mode_remote $mode_remote;
  341.         return $this;
  342.     }
  343.     public function getYearRequired(): ?string
  344.     {
  345.         return $this->year_required;
  346.     }
  347.     public function setYearRequired(string $year_required): self
  348.     {
  349.         $this->year_required $year_required;
  350.         return $this;
  351.     }
  352.     public function getShowCoordinate(): ?bool
  353.     {
  354.         return $this->show_coordinate;
  355.     }
  356.     public function setShowCoordinate(?bool $show_coordinate): self
  357.     {
  358.         $this->show_coordinate $show_coordinate;
  359.         return $this;
  360.     }
  361.     public function getRenew(): ?bool
  362.     {
  363.         return $this->renew;
  364.     }
  365.     public function setRenew(bool $renew): self
  366.     {
  367.         $this->renew $renew;
  368.         return $this;
  369.     }
  370.     public function getCreatedAt(): ?\DateTimeInterface
  371.     {
  372.         return $this->created_at;
  373.     }
  374.     public function setCreatedAt(?\DateTimeInterface $created_at): self
  375.     {
  376.         $this->created_at $created_at;
  377.         return $this;
  378.     }
  379.     public function getExpireAt(): ?\DateTimeInterface
  380.     {
  381.         return $this->expire_at;
  382.     }
  383.     public function setExpireAt(?\DateTimeInterface $expire_at): self
  384.     {
  385.         $this->expire_at $expire_at;
  386.         return $this;
  387.     }
  388.     public function getCostText(): string
  389.     {
  390.         if(empty($this->max_tjm) && empty($this->min_tjm)){
  391.             return 'Selon profil';
  392.         }
  393.         if(empty($this->min_tjm)){
  394.             return 'Max '.$this->max_tjm.'€ HT';
  395.         }
  396.         if(empty($this->max_tjm)){
  397.             return 'Min '.$this->min_tjm.'€ HT';
  398.         }
  399.         return $this->min_tjm.'€'.' - '.$this->max_tjm.'€ HT';
  400.     }
  401.     public function getDurationText(): string
  402.     {
  403.         $ending = ($this->duration_type === 'an' && $this->duration_value 1) ? 's' '';
  404.         return $this->duration_value.' '.$this->duration_type$ending;
  405.     }
  406.     public function getContactCivility(): ?string
  407.     {
  408.         return $this->contact_civility;
  409.     }
  410.     public function setContactCivility(?string $contact_civility): self
  411.     {
  412.         $this->contact_civility $contact_civility;
  413.         return $this;
  414.     }
  415.     public function getContactMail(): ?string
  416.     {
  417.         return $this->contact_mail;
  418.     }
  419.     public function setContactMail(?string $contact_mail): self
  420.     {
  421.         $this->contact_mail $contact_mail;
  422.         return $this;
  423.     }
  424.     public function getContactPhone(): ?string
  425.     {
  426.         return $this->contact_phone;
  427.     }
  428.     public function setContactPhone(?string $contact_phone): self
  429.     {
  430.         $this->contact_phone $contact_phone;
  431.         return $this;
  432.     }
  433.     public function getContactName(): ?string
  434.     {
  435.         return $this->contact_name;
  436.     }
  437.     public function setContactName(?string $contact_name): self
  438.     {
  439.         $this->contact_name $contact_name;
  440.         return $this;
  441.     }
  442.     public function getQuestions(): ?array
  443.     {
  444.         return $this->questions;
  445.     }
  446.     public function setQuestions(?array $questions): self
  447.     {
  448.         if(is_array($questions)){
  449.             foreach($questions as $key => $question){
  450.                 if(empty($question)){
  451.                     unset($questions[$key]);
  452.                 }
  453.             }
  454.         }
  455.         $this->questions $questions;
  456.         return $this;
  457.     }
  458.     /**
  459.      * @return Collection|Candidature[]
  460.      */
  461.     public function getCandidatures(): Collection
  462.     {
  463.         return $this->candidatures;
  464.     }
  465.     public function addCandidature(Candidature $candidature): self
  466.     {
  467.         if (!$this->candidatures->contains($candidature)) {
  468.             $this->candidatures[] = $candidature;
  469.             $candidature->setOffer($this);
  470.         }
  471.         return $this;
  472.     }
  473.     public function removeCandidature(Candidature $candidature): self
  474.     {
  475.         if ($this->candidatures->removeElement($candidature)) {
  476.             // set the owning side to null (unless already changed)
  477.             if ($candidature->getOffer() === $this) {
  478.                 $candidature->setOffer(null);
  479.             }
  480.         }
  481.         return $this;
  482.     }
  483.     public function getView(): ?int
  484.     {
  485.         return $this->view ?? 0;
  486.     }
  487.     public function setView(?int $view): self
  488.     {
  489.         $this->view $view;
  490.         return $this;
  491.     }
  492.     public function incrementView(): self
  493.     {
  494.         $this->view++;
  495.         return $this;
  496.     }
  497.     public function getUnseenCandidature(): ?int
  498.     {
  499.         return $this->unseenCandidature ?? 0;
  500.     }
  501.     public function setUnseenCandidature(?int $unseenCandidature): self
  502.     {
  503.         $this->unseenCandidature $unseenCandidature;
  504.         return $this;
  505.     }
  506.     public function incrementUnseenCandidature(): self
  507.     {
  508.         $this->unseenCandidature++;
  509.         return $this;
  510.     }
  511.     public function normalize(NormalizerInterface $normalizerstring $format null, array $context = []): array
  512.     {
  513.         return [
  514.             'title' => $this->getTitle(),
  515.             'cost_min' => $this->getMinTjm(),
  516.             'cost_max' => $this->getMaxTjm(),
  517.             'location' => $this->getLocation(),
  518.             'created_at' => $this->getCreatedAt(),
  519.             'expire_at' => $this->getExpireAt(),
  520.             'description' => $this->getDescription(),
  521.             'mode_remote' => $this->getModeRemote(),
  522.             'timestamp_create' => $this->getCreatedAt()->getTimestamp(),
  523.             'priorize' => $this->getPriorize(),
  524.             'daily' => $this->getDaily(),
  525.             'weekly' => $this->getWeekly(),
  526.             'identification' => $this->getId(),
  527.         ];
  528.     }
  529.     /**
  530.      * @return Collection|OfferFavorite[]
  531.      */
  532.     public function getOfferFavorites(): Collection
  533.     {
  534.         return $this->offerFavorites;
  535.     }
  536.     public function addOfferFavorite(OfferFavorite $offerFavorite): self
  537.     {
  538.         if (!$this->offerFavorites->contains($offerFavorite)) {
  539.             $this->offerFavorites[] = $offerFavorite;
  540.             $offerFavorite->setOffer($this);
  541.         }
  542.         return $this;
  543.     }
  544.     public function removeOfferFavorite(OfferFavorite $offerFavorite): self
  545.     {
  546.         if ($this->offerFavorites->removeElement($offerFavorite)) {
  547.             // set the owning side to null (unless already changed)
  548.             if ($offerFavorite->getOffer() === $this) {
  549.                 $offerFavorite->setOffer(null);
  550.             }
  551.         }
  552.         return $this;
  553.     }
  554.     public function getVille(): ?string
  555.     {
  556.         return $this->ville;
  557.     }
  558.     public function setVille(?string $ville): self
  559.     {
  560.         $this->ville $ville;
  561.         return $this;
  562.     }
  563.     public function getAddress(): ?string
  564.     {
  565.         return empty($this->ville) ? $this->location $this->ville;
  566.     }
  567.     public function getPriorize(): ?bool
  568.     {
  569.         return $this->priorize;
  570.     }
  571.     public function setPriorize(?bool $priorize): self
  572.     {
  573.         $this->priorize $priorize;
  574.         return $this;
  575.     }
  576.     public function getWeekly(): ?bool
  577.     {
  578.         return $this->weekly;
  579.     }
  580.     public function setWeekly(?bool $weekly): self
  581.     {
  582.         $this->weekly $weekly;
  583.         return $this;
  584.     }
  585.     public function getDaily(): ?bool
  586.     {
  587.         return $this->daily;
  588.     }
  589.     public function setDaily(?bool $daily): self
  590.     {
  591.         $this->daily $daily;
  592.         return $this;
  593.     }
  594.     public function isToday(): bool
  595.     {
  596.         $date = new \DateTime();
  597.         $matchDate $this->getCreatedAt();
  598.         $interval $date->diff($matchDate);
  599.         return $interval->days == 0;
  600.     }
  601.     public function isOpenSociety(): ?bool
  602.     {
  603.         return $this->open_society;
  604.     }
  605.     public function isShowCoordinate(): ?bool
  606.     {
  607.         return $this->show_coordinate;
  608.     }
  609.     public function isRenew(): ?bool
  610.     {
  611.         return $this->renew;
  612.     }
  613.     public function isPriorize(): ?bool
  614.     {
  615.         return $this->priorize;
  616.     }
  617.     public function isWeekly(): ?bool
  618.     {
  619.         return $this->weekly;
  620.     }
  621.     public function isDaily(): ?bool
  622.     {
  623.         return $this->daily;
  624.     }
  625.     public function getUserRecruteur(): ?User
  626.     {
  627.         return $this->userRecruteur;
  628.     }
  629.     public function setUserRecruteur(?User $userRecruteur): self
  630.     {
  631.         $this->userRecruteur $userRecruteur;
  632.         return $this;
  633.     }
  634.     public function getCivility(): ?int
  635.     {
  636.         return $this->civility;
  637.     }
  638.     public function setCivility(?int $civility): self
  639.     {
  640.         $this->civility $civility;
  641.         return $this;
  642.     }
  643.     public function getTypeSearch(): ?string
  644.     {
  645.         return $this->typeSearch;
  646.     }
  647.     public function setTypeSearch(?string $typeSearch): self
  648.     {
  649.         $this->typeSearch $typeSearch;
  650.         return $this;
  651.     }
  652.     public function getSalaryPerMonthMin(): ?int
  653.     {
  654.         return $this->salaryPerMonthMin;
  655.     }
  656.     public function setSalaryPerMonthMin(?int $salaryPerMonthMin): self
  657.     {
  658.         $this->salaryPerMonthMin $salaryPerMonthMin;
  659.         return $this;
  660.     }
  661.     public function getSalaryPerMonthMax(): ?int
  662.     {
  663.         return $this->salaryPerMonthMax;
  664.     }
  665.     public function setSalaryPerMonthMax(?int $salaryPerMonthMax): self
  666.     {
  667.         $this->salaryPerMonthMax $salaryPerMonthMax;
  668.         return $this;
  669.     }
  670.     public function getSalaryPerHourMin(): ?int
  671.     {
  672.         return $this->salaryPerHourMin;
  673.     }
  674.     public function setSalaryPerHourMin(?int $salaryPerHourMin): self
  675.     {
  676.         $this->salaryPerHourMin $salaryPerHourMin;
  677.         return $this;
  678.     }
  679.     public function getSalaryPerHourMax(): ?int
  680.     {
  681.         return $this->salaryPerHourMax;
  682.     }
  683.     public function setSalaryPerHourMax(?int $salaryPerHourMax): self
  684.     {
  685.         $this->salaryPerHourMax $salaryPerHourMax;
  686.         return $this;
  687.     }
  688.     public function getDurationValue(): ?int
  689.     {
  690.         return $this->duration_value;
  691.     }
  692.     public function setDurationValue(?int $duration_value): self
  693.     {
  694.         $this->duration_value $duration_value;
  695.         return $this;
  696.     }
  697.     public function getDurationType(): ?string
  698.     {
  699.         return $this->duration_type;
  700.     }
  701.     public function setDurationType(?string $duration_type): self
  702.     {
  703.         $this->duration_type $duration_type;
  704.         return $this;
  705.     }
  706.     public function getStartingType(): ?string
  707.     {
  708.         return $this->starting_type;
  709.     }
  710.     public function setStartingType(?string $starting_type): self
  711.     {
  712.         $this->starting_type $starting_type;
  713.         return $this;
  714.     }
  715.     public function getStartinDate(): ?\DateTimeInterface
  716.     {
  717.         return $this->startin_date;
  718.     }
  719.     public function setStartinDate(?\DateTimeInterface $startin_date): self
  720.     {
  721.         $this->startin_date $startin_date;
  722.         return $this;
  723.     }
  724.     public function getSociety(): ?Society
  725.     {
  726.         return $this->society;
  727.     }
  728.     public function setSociety(?Society $society): self
  729.     {
  730.         $this->society $society;
  731.         return $this;
  732.     }
  733.     public function getSocietyExternName(): ?string
  734.     {
  735.         return $this->societyExternName;
  736.     }
  737.     public function setSocietyExternName(?string $societyExternName): self
  738.     {
  739.         $this->societyExternName $societyExternName;
  740.         return $this;
  741.     }
  742.     public function getLinkExtern(): ?string
  743.     {
  744.         return $this->linkExtern;
  745.     }
  746.     public function setLinkExtern(?string $linkExtern): self
  747.     {
  748.         $this->linkExtern $linkExtern;
  749.         return $this;
  750.     }
  751.     public function getDateRemonter(): ?\DateTimeInterface
  752.     {
  753.         return $this->dateRemonter;
  754.     }
  755.     public function setDateRemonter(?\DateTimeInterface $dateRemonter): self
  756.     {
  757.         $this->dateRemonter $dateRemonter;
  758.         return $this;
  759.     }
  760.     public function isNotDraft(): ?bool
  761.     {
  762.         return $this->notDraft;
  763.     }
  764.     public function setNotDraft(?bool $notDraft): self
  765.     {
  766.         $this->notDraft $notDraft;
  767.         return $this;
  768.     }
  769.     public function isShareOnSocialNetwork(): ?bool
  770.     {
  771.         return $this->shareOnSocialNetwork;
  772.     }
  773.     public function setShareOnSocialNetwork(?bool $shareOnSocialNetwork): self
  774.     {
  775.         $this->shareOnSocialNetwork $shareOnSocialNetwork;
  776.         return $this;
  777.     }
  778.     public function isBySuperAdmin(): ?bool
  779.     {
  780.         return $this->bySuperAdmin;
  781.     }
  782.     public function setBySuperAdmin(?bool $bySuperAdmin): self
  783.     {
  784.         $this->bySuperAdmin $bySuperAdmin;
  785.         return $this;
  786.     }
  787.     public function isSiteMapIndex(): ?bool
  788.     {
  789.         return $this->siteMapIndex;
  790.     }
  791.     public function setSiteMapIndex(?bool $siteMapIndex): self
  792.     {
  793.         $this->siteMapIndex $siteMapIndex;
  794.         return $this;
  795.     }
  796.     public function getUserByAdmin(): ?User
  797.     {
  798.         return $this->userByAdmin;
  799.     }
  800.     public function setUserByAdmin(?User $userByAdmin): self
  801.     {
  802.         $this->userByAdmin $userByAdmin;
  803.         return $this;
  804.     }
  805.     public function getSlug(): ?string
  806.     {
  807.         return $this->slug;
  808.     }
  809.     public function setSlug(?string $slug): self
  810.     {
  811.         $this->slug $slug;
  812.         return $this;
  813.     }
  814. }