Private
Public Access
1
0

chg: pkg: make a massive refactor to the backend and remove all unnecessary deps - and make small refactors for the frontend too #4

This commit is contained in:
2026-04-09 20:21:01 +02:00
parent 23547f4237
commit b55c223d8a
55 changed files with 1567 additions and 4398 deletions

View File

@@ -1,8 +1,8 @@
<?php
/**
<?php declare(strict_types=1);
/*
* This file is part of the SplendidBear Websites' projects.
*
* Copyright (c) 2019 @ www.splendidbear.org
* Copyright (c) 2026 @ www.splendidbear.org
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@@ -10,74 +10,74 @@
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use App\Repository\GridRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping\Column;
use Doctrine\ORM\Mapping\Entity;
use Doctrine\ORM\Mapping\GeneratedValue;
use Doctrine\ORM\Mapping\Id;
use Doctrine\ORM\Mapping\JoinColumn;
use Doctrine\ORM\Mapping\OneToMany;
use Doctrine\ORM\Mapping\OneToOne;
/**
* Class Grid
*
* @package App\Entity
* @author system7 <https://www.splendidbear.org>
*
* @ORM\Entity(repositoryClass="App\Repository\GridRepository")
* @package App\Entity
* @author Lang <https://www.splendidbear.org>
* @category Class
* @license https://www.gnu.org/licenses/lgpl-3.0.en.html GNU Lesser General Public License
* @link www.splendidbear.org
* @since 2026. 04. 09.
*/
#[Entity(repositoryClass: GridRepository::class)]
class Grid
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
#[Id, GeneratedValue, Column]
private ?int $id = null;
/**
* @var PlayedGame|null
*
* @ORM\OneToOne(targetEntity="App\Entity\PlayedGame", inversedBy="grid", cascade={"persist"})
*/
private $playedGame;
#[OneToOne(inversedBy: 'grid', cascade: ['persist'])]
private ?PlayedGame $playedGame = null;
/**
* @var GridRow|null
*
* @ORM\OneToMany(targetEntity="App\Entity\GridRow", mappedBy="grid", cascade={"persist"})
* @ORM\JoinColumn(name="grid_row", referencedColumnName="id", onDelete="CASCADE")
*/
private $gridRow;
#[OneToMany(mappedBy: 'grid', targetEntity: GridRow::class, cascade: ['persist'])]
#[JoinColumn(name: 'grid_row', referencedColumnName: 'id', onDelete: 'CASCADE')]
private Collection $gridRow;
public function __construct()
{
$this->gridRow = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
/**
* @return PlayedGame|null
*/
public function getPlayedGame()
public function getPlayedGame(): ?PlayedGame
{
return $this->playedGame;
}
/**
* @param PlayedGame|null $playedGame
*/
public function setPlayedGame( $playedGame): void
public function setPlayedGame(?PlayedGame $playedGame): void
{
$this->playedGame = $playedGame;
}
/**
* @return GridRow|null
*/
public function getGridRow()
public function getGridRow(): Collection
{
return $this->gridRow;
}
/**
* @param GridRow|null $gridRow
*/
public function setGridRow( $gridRow): void
public function addGridRow(GridRow $gridRow): void
{
$this->gridRow = $gridRow;
$this->gridRow->add($gridRow);
$gridRow->setGrid($this);
}
public function removeGridRow(GridRow $gridRow): void
{
$this->gridRow->removeElement($gridRow);
}
}