src/Entity/Api/Page.php line 18

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Api;
  3. use ApiPlatform\Core\Annotation\ApiFilter;
  4. use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter;
  5. use ApiPlatform\Core\Annotation\ApiResource;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass="App\Repository\PageRepository")
  9.  * @ApiResource(
  10.  * collectionOperations={"get"},
  11.  * itemOperations={"get"})
  12.  * @ApiFilter(SearchFilter::class, properties={"name":"partial", "seoId":"exact","site":"exact","lang":"exact"})
  13.  * 
  14.  */
  15. class Page {
  16.     /**
  17.      * @ORM\Id
  18.      * @ORM\Column(type="integer")
  19.      */
  20.     protected $id;
  21.     /**
  22.      * @ORM\Column(type="string", length=200)
  23.      */
  24.     protected $name;
  25.     /**
  26.      * @ORM\Column(name="title", type="string", length=200)
  27.      */
  28.     protected $title;
  29.     /**
  30.      * @ORM\Column(type="string", length=200, nullable = true)
  31.      */
  32.     protected $linkName;
  33.     /**
  34.      * @ORM\Column(type="string", nullable = true)
  35.      */
  36.     protected $lvl;
  37.     /**
  38.      * @ORM\Column(type="integer", nullable = true)
  39.      */
  40.     protected $sortOrder;
  41.     /**
  42.      * @ORM\Column(type="string", length=255, nullable = true)
  43.      */
  44.     protected $seoId;
  45.     /**
  46.      * @ORM\Column(name="content", type="text", length=10000, nullable = true)
  47.      */
  48.     protected $content;
  49.     /**
  50.      * @ORM\Column(type="string", length=100, nullable = true)
  51.      */
  52.     protected $status;
  53.     /**
  54.      * @ORM\Column(type="string", nullable = true)
  55.      */
  56.     protected $lang;
  57.     /**
  58.      * @ORM\Column(type="integer", nullable = true)
  59.      */
  60.     protected $parentId;
  61.     
  62.     private $pageBlocks;
  63.     /**
  64.      * @ORM\Column(type="string", length=255, nullable = true)
  65.      */
  66.     protected $icon;
  67.     /**
  68.      * @ORM\Column(type="string", length=2000, nullable = true)
  69.      */
  70.     protected $teaser;
  71.       /**
  72.      * @ORM\Column(type="array", nullable=true)
  73.      */
  74.     protected $site;
  75.     protected $block;
  76.     protected $statistic;
  77.     protected $menuCrumbs;
  78.     protected $menuSubpages;
  79.     public function setId(int $id): self
  80.     {
  81.          $this->id  $id;
  82.          return $this;
  83.     }
  84.     public function getId(): ?int
  85.     {
  86.         return $this->id;
  87.     }
  88.     public function getName(): ?string
  89.     {
  90.         return $this->name;
  91.     }
  92.     public function setName(string $name): self
  93.     {
  94.         $this->name $name;
  95.         return $this;
  96.     }
  97.     public function getTitle(): ?string
  98.     {
  99.         return $this->title;
  100.     }
  101.     public function setTitle(string $title): self
  102.     {
  103.         $this->title $title;
  104.         return $this;
  105.     }
  106.     public function getLinkName(): ?string
  107.     {
  108.         return $this->linkName;
  109.     }
  110.     public function setLinkName(?string $linkName): self
  111.     {
  112.         $this->linkName $linkName;
  113.         return $this;
  114.     }
  115.     public function getLvl(): ?int
  116.     {
  117.         return $this->lvl;
  118.     }
  119.     public function setLvl(?int $lvl): self
  120.     {
  121.         $this->lvl $lvl;
  122.         return $this;
  123.     }
  124.     public function getSortOrder(): ?int
  125.     {
  126.         return $this->sortOrder;
  127.     }
  128.     public function setSortOrder(?int $sortOrder): self
  129.     {
  130.         $this->sortOrder $sortOrder;
  131.         return $this;
  132.     }
  133.     public function getSeoId(): ?string
  134.     {
  135.         return $this->seoId;
  136.     }
  137.     public function setSeoId(?string $seoId): self
  138.     {
  139.         $this->seoId $seoId;
  140.         return $this;
  141.     }
  142.     public function getContent(): ?string
  143.     {
  144.         return $this->content;
  145.     }
  146.     public function setContent(?string $content): self
  147.     {
  148.         $this->content $content;
  149.         return $this;
  150.     }
  151.     public function getStatus(): ?string
  152.     {
  153.         return $this->status;
  154.     }
  155.     public function setStatus(?string $status): self
  156.     {
  157.         $this->status $status;
  158.         return $this;
  159.     }
  160.     public function getLang(): ?string
  161.     {
  162.         return $this->lang;
  163.     }
  164.     public function setLang(?string $lang): self
  165.     {
  166.         $this->lang $lang;
  167.         return $this;
  168.     }
  169.     public function getParentId(): ?int
  170.     {
  171.         return $this->parentId;
  172.     }
  173.     public function setParentId(?int $parentId): self
  174.     {
  175.         $this->parentId $parentId;
  176.         return $this;
  177.     }
  178.     public function getIcon(): ?string
  179.     {
  180.         return $this->icon;
  181.     }
  182.     public function setIcon(?string $icon): self
  183.     {
  184.         $this->icon $icon;
  185.         return $this;
  186.     }
  187.     public function getTeaser(): ?string
  188.     {
  189.         return $this->teaser;
  190.     }
  191.     public function setTeaser(?string $teaser): self
  192.     {
  193.         $this->teaser $teaser;
  194.         return $this;
  195.     }
  196.    
  197.     /**
  198.      * Get the value of site
  199.      */ 
  200.     public function getSite()
  201.     {
  202.         return $this->site;
  203.     }
  204.     /**
  205.      * Set the value of site
  206.      *
  207.      * @return  self
  208.      */ 
  209.     public function setSite($site)
  210.     {
  211.         $this->site $site;
  212.         return $this;
  213.     }
  214.     /**
  215.      * Get the value of block
  216.      */ 
  217.     public function getBlock()
  218.     {
  219.         return $this->block;
  220.     }
  221.     /**
  222.      * Set the value of block
  223.      *
  224.      * @return  self
  225.      */ 
  226.     public function setBlock($block)
  227.     {
  228.         $this->block $block;
  229.         return $this;
  230.     }
  231.     /**
  232.      * Get the value of statistic
  233.      */ 
  234.     public function getStatistic()
  235.     {
  236.         return $this->statistic;
  237.     }
  238.     /**
  239.      * Set the value of statistic
  240.      *
  241.      * @return  self
  242.      */ 
  243.     public function setStatistic($statistic)
  244.     {
  245.         $this->statistic $statistic;
  246.         return $this;
  247.     }
  248.    
  249.     /**
  250.      * Get the value of menuCrumbs
  251.      */ 
  252.     public function getMenuCrumbs()
  253.     {
  254.         return $this->menuCrumbs;
  255.     }
  256.     /**
  257.      * Set the value of menuCrumbs
  258.      *
  259.      * @return  self
  260.      */ 
  261.     public function setMenuCrumbs($menuCrumbs)
  262.     {
  263.         $this->menuCrumbs $menuCrumbs;
  264.         return $this;
  265.     }
  266.     /**
  267.      * Get the value of menuSubpages
  268.      */ 
  269.     public function getMenuSubpages()
  270.     {
  271.         return $this->menuSubpages;
  272.     }
  273.     /**
  274.      * Set the value of menuSubpages
  275.      *
  276.      * @return  self
  277.      */ 
  278.     public function setMenuSubpages($menuSubpages)
  279.     {
  280.         $this->menuSubpages $menuSubpages;
  281.         return $this;
  282.     }
  283. }