src/Entity/RedactionList.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass="App\EntityRepo\RedactionListRepo")
  9.  * @ORM\Table(name="redaction_list")
  10.  */
  11. class RedactionList
  12. {
  13.     /**
  14.      * @ORM\Column(type="integer")
  15.      * @ORM\Id
  16.      * @ORM\GeneratedValue(strategy="AUTO")
  17.      */ 
  18.     protected $redactionListId=0;
  19.     /**
  20.      * @ORM\Column(type="string", length=100)
  21.      */
  22.     protected $redactionListName;
  23.     /**
  24.      * @ORM\Column(type="text", nullable=true)
  25.      */
  26.     protected $redactionListDescription;    
  27.     
  28.     /**
  29.      * @ORM\Column(type="boolean", nullable=true)
  30.      */
  31.     protected $isPublic=true;    
  32.     
  33.     /**
  34.      * @ORM\Column(type="boolean", nullable=true)
  35.      */
  36.     protected $isWebBased=true;    
  37.     
  38.     
  39.     /**
  40.      * @ORM\Column(type="date", nullable=true)
  41.      */
  42.     protected $dateCreated;    
  43.     
  44.     /**
  45.      * @ORM\Column(type="integer")
  46.      */
  47.     protected $wepagesCount=0;
  48.     
  49.     /**
  50.      * @ORM\Column(type="integer")
  51.      */
  52.     protected $thumbWidth=0;    
  53.     /**
  54.      * @ORM\Column(type="integer")
  55.      */
  56.     protected $thumbHeight=0;       
  57.     /**
  58.      * @ORM\Column(type="integer")
  59.      */
  60.     protected $priority=3;    
  61.     /**
  62.      * @ORM\Column(type="integer", length=100)
  63.      */    
  64.     protected $userId=0;    
  65.     /**
  66.      * Many RedactionLists have Many WebPages.
  67.      * @ORM\ManyToMany(targetEntity="WebPage",cascade={"persist"})
  68.      * @ORM\JoinTable(name="redaction_list_webpage",
  69.      *      joinColumns={@ORM\JoinColumn(name="redaction_list_id", referencedColumnName="redaction_list_id")},
  70.      *      inverseJoinColumns={@ORM\JoinColumn(name="web_page_id", referencedColumnName="web_page_id", unique=false)}
  71.      *      )
  72.      */
  73.     protected $webPages
  74.     /**
  75.      * @ORM\Column(type="integer")
  76.      */
  77.     protected $score=0;  
  78.     /**
  79.      * @ORM\Column(type="string", length=100, nullable=true)
  80.      */
  81.     protected $cssClass;          
  82.     /**
  83.      * Constructor
  84.      */
  85.     public function __construct()
  86.     {
  87.         $this->webPages = new \Doctrine\Common\Collections\ArrayCollection();
  88.     }
  89.     public function getRedactionListId(): ?int
  90.     {
  91.         return $this->redactionListId;
  92.     }
  93.     public function getRedactionListName(): ?string
  94.     {
  95.         return $this->redactionListName;
  96.     }
  97.     public function setRedactionListName(string $redactionListName): static
  98.     {
  99.         $this->redactionListName $redactionListName;
  100.         return $this;
  101.     }
  102.     public function getRedactionListDescription(): ?string
  103.     {
  104.         return $this->redactionListDescription;
  105.     }
  106.     public function setRedactionListDescription(?string $redactionListDescription): static
  107.     {
  108.         $this->redactionListDescription $redactionListDescription;
  109.         return $this;
  110.     }
  111.     public function isIsPublic(): ?bool
  112.     {
  113.         return $this->isPublic;
  114.     }
  115.     public function setIsPublic(?bool $isPublic): static
  116.     {
  117.         $this->isPublic $isPublic;
  118.         return $this;
  119.     }
  120.     public function isIsWebBased(): ?bool
  121.     {
  122.         return $this->isWebBased;
  123.     }
  124.     public function setIsWebBased(?bool $isWebBased): static
  125.     {
  126.         $this->isWebBased $isWebBased;
  127.         return $this;
  128.     }
  129.     public function getDateCreated(): ?\DateTimeInterface
  130.     {
  131.         return $this->dateCreated;
  132.     }
  133.     public function setDateCreated(?\DateTimeInterface $dateCreated): static
  134.     {
  135.         $this->dateCreated $dateCreated;
  136.         return $this;
  137.     }
  138.     public function getWepagesCount(): ?int
  139.     {
  140.         return $this->wepagesCount;
  141.     }
  142.     public function setWepagesCount(int $wepagesCount): static
  143.     {
  144.         $this->wepagesCount $wepagesCount;
  145.         return $this;
  146.     }
  147.     public function getThumbWidth(): ?int
  148.     {
  149.         return $this->thumbWidth;
  150.     }
  151.     public function setThumbWidth(int $thumbWidth): static
  152.     {
  153.         $this->thumbWidth $thumbWidth;
  154.         return $this;
  155.     }
  156.     public function getThumbHeight(): ?int
  157.     {
  158.         return $this->thumbHeight;
  159.     }
  160.     public function setThumbHeight(int $thumbHeight): static
  161.     {
  162.         $this->thumbHeight $thumbHeight;
  163.         return $this;
  164.     }
  165.     public function getPriority(): ?int
  166.     {
  167.         return $this->priority;
  168.     }
  169.     public function setPriority(int $priority): static
  170.     {
  171.         $this->priority $priority;
  172.         return $this;
  173.     }
  174.     public function getUserId(): ?int
  175.     {
  176.         return $this->userId;
  177.     }
  178.     public function setUserId(int $userId): static
  179.     {
  180.         $this->userId $userId;
  181.         return $this;
  182.     }
  183.     public function getScore(): ?int
  184.     {
  185.         return $this->score;
  186.     }
  187.     public function setScore(int $score): static
  188.     {
  189.         $this->score $score;
  190.         return $this;
  191.     }
  192.     public function getCssClass(): ?string
  193.     {
  194.         return $this->cssClass;
  195.     }
  196.     public function setCssClass(?string $cssClass): static
  197.     {
  198.         $this->cssClass $cssClass;
  199.         return $this;
  200.     }
  201.     /**
  202.      * @return Collection<int, WebPage>
  203.      */
  204.     public function getWebPages(): Collection
  205.     {
  206.         return $this->webPages;
  207.     }
  208.     public function addWebPage(WebPage $webPage): static
  209.     {
  210.         if (!$this->webPages->contains($webPage)) {
  211.             $this->webPages->add($webPage);
  212.         }
  213.         return $this;
  214.     }
  215.     public function removeWebPage(WebPage $webPage): static
  216.     {
  217.         $this->webPages->removeElement($webPage);
  218.         return $this;
  219.     }
  220. }