relaunch
This commit is contained in:
README.mdcontrollers.jsondocker-compose.override.ymldocker-compose.yml
assets
bootstrap.jsconfig
packages
routes
migrations
Version20220409135404.phpVersion20220409150258.phpVersion20220410123550.phpVersion20220410131552.php
src
Controller
Entity
Repository
Security
templates
admin
projects
user
translations
140
src/Entity/Projects.php
Normal file
140
src/Entity/Projects.php
Normal file
@@ -0,0 +1,140 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Repository\ProjectsRepository;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
#[ORM\Entity(repositoryClass: ProjectsRepository::class)]
|
||||
class Projects
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column(type: 'integer')]
|
||||
private ?int $id;
|
||||
|
||||
#[ORM\Column(type: 'string', length: 255)]
|
||||
private ?string $name;
|
||||
|
||||
#[ORM\Column(type: 'string', length: 255)]
|
||||
private ?string $description;
|
||||
|
||||
#[ORM\Column(type: 'string', length: 255)]
|
||||
private ?string $url;
|
||||
|
||||
#[ORM\Column(type: 'datetime_immutable')]
|
||||
private ?\DateTimeImmutable $createdAt;
|
||||
|
||||
#[ORM\Column(type: 'string', length: 255, nullable: true)]
|
||||
private ?string $teaserImage;
|
||||
|
||||
#[ORM\ManyToMany(targetEntity: User::class, inversedBy: 'projects')]
|
||||
private $developer;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->developer = new ArrayCollection();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return null|string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
public function getURL(): ?string
|
||||
{
|
||||
return $this->url;
|
||||
}
|
||||
|
||||
public function setURL(string $url): self
|
||||
{
|
||||
$this->url = $url;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getCreatedAt(): ?\DateTimeImmutable
|
||||
{
|
||||
return $this->createdAt;
|
||||
}
|
||||
|
||||
public function setCreatedAt(\DateTimeImmutable $createdAt): self
|
||||
{
|
||||
$this->createdAt = $createdAt;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getTeaserImage(): ?string
|
||||
{
|
||||
return $this->teaserImage;
|
||||
}
|
||||
|
||||
public function setTeaserImage(?string $teaserImage): self
|
||||
{
|
||||
$this->teaserImage = $teaserImage;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection<int, User>
|
||||
*/
|
||||
public function getDeveloper(): Collection
|
||||
{
|
||||
return $this->developer;
|
||||
}
|
||||
|
||||
public function addDeveloper(User $developer): self
|
||||
{
|
||||
if (!$this->developer->contains($developer)) {
|
||||
$this->developer[] = $developer;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeDeveloper(User $developer): self
|
||||
{
|
||||
$this->developer->removeElement($developer);
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
35
src/Entity/Quotes.php
Normal file
35
src/Entity/Quotes.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Repository\QuotesRepository;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Entity(repositoryClass: QuotesRepository::class)]
|
||||
class Quotes
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column(type: 'integer')]
|
||||
private $id;
|
||||
|
||||
#[ORM\Column(type: 'text')]
|
||||
private $quote;
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getQuote(): ?string
|
||||
{
|
||||
return $this->quote;
|
||||
}
|
||||
|
||||
public function setQuote(string $quote): self
|
||||
{
|
||||
$this->quote = $quote;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user