@@ -15,9 +15,7 @@ class CommandAdminController extends AbstractController | |||
{ | |||
use ControllerTrait; | |||
/** | |||
* @Route("/admin/command/cache/clear", name="admin_command_cache_clear") | |||
*/ | |||
#[Route(path: '/admin/command/cache/clear', name: 'admin_command_cache_clear')] | |||
public function cacheClear(Request $request) | |||
{ | |||
$this->doCommand('cache:clear'); |
@@ -19,9 +19,7 @@ class DashboardAdminController extends AbstractDashboardController | |||
use ControllerTrait; | |||
/** | |||
* @Route("/admin", name="app_admin_dashboard") | |||
*/ | |||
#[Route(path: '/admin', name: 'app_admin_dashboard')] | |||
public function index(): Response | |||
{ | |||
return $this->render('@LcSov/adminlte/dashboard.html.twig'); |
@@ -40,9 +40,7 @@ class ReminderAdminController extends AbstractController | |||
$this->parameterBag = $parameterBag; | |||
} | |||
/** | |||
* @Route("/admin/reminder/modal", name="sov_admin_reminder_render_modal") | |||
*/ | |||
#[Route(path: '/admin/reminder/modal', name: 'sov_admin_reminder_render_modal')] | |||
public function renderModal(Request $request): Response | |||
{ | |||
$id = $request->get('id'); | |||
@@ -80,9 +78,7 @@ class ReminderAdminController extends AbstractController | |||
); | |||
} | |||
/** | |||
* @Route("/admin/reminder/new", name="sov_admin_reminder_new") | |||
*/ | |||
#[Route(path: '/admin/reminder/new', name: 'sov_admin_reminder_new')] | |||
public function new(Request $request) | |||
{ | |||
$reminder = $this->createEntity(); | |||
@@ -101,9 +97,7 @@ class ReminderAdminController extends AbstractController | |||
return $this->redirect($request->headers->get('referer')); | |||
} | |||
/** | |||
* @Route("/admin/reminder/edit/{id}", name="sov_admin_reminder_edit") | |||
*/ | |||
#[Route(path: '/admin/reminder/edit/{id}', name: 'sov_admin_reminder_edit')] | |||
public function edit(Request $request) | |||
{ | |||
$id = $request->get('id'); | |||
@@ -123,9 +117,7 @@ class ReminderAdminController extends AbstractController | |||
return $this->redirect($request->headers->get('referer')); | |||
} | |||
/** | |||
* @Route("/admin/reminder/done", name="sov_admin_reminder_done") | |||
*/ | |||
#[Route(path: '/admin/reminder/done', name: 'sov_admin_reminder_done')] | |||
public function done(Request $request): JsonResponse | |||
{ | |||
$id = $request->get('id'); |
@@ -10,9 +10,7 @@ use Symfony\Component\Security\Http\Authentication\AuthenticationUtils; | |||
class SecurityAdminController extends AbstractController | |||
{ | |||
/** | |||
* @Route("/login", name="sov_login") | |||
*/ | |||
#[Route(path: '/login', name: 'sov_login')] | |||
public function login(AuthenticationUtils $authenticationUtils, Request $request): Response | |||
{ | |||
if ($this->getUser()) { | |||
@@ -66,9 +64,7 @@ class SecurityAdminController extends AbstractController | |||
]); | |||
} | |||
/** | |||
* @Route("/logout", name="sov_logout") | |||
*/ | |||
#[Route(path: '/logout', name: 'sov_logout')] | |||
public function logout() | |||
{ | |||
throw new \LogicException( |
@@ -10,9 +10,7 @@ use Symfony\Component\Routing\Annotation\Route; | |||
class SettingAdminController extends AbstractController | |||
{ | |||
/** | |||
* @Route("/admin/setting/site", name="sov_admin_setting_site") | |||
*/ | |||
#[Route(path: '/admin/setting/site', name: 'sov_admin_setting_site')] | |||
public function manageGlobal(Request $request) | |||
{ | |||
$entityManager = $this->getEntityManager(); |
@@ -24,9 +24,7 @@ class AccountAdminController extends AbstractController | |||
$this->entityManager = $entityManager; | |||
} | |||
/** | |||
* @Route("/admin/account/profile", name="sov_admin_account_profile") | |||
*/ | |||
#[Route(path: '/admin/account/profile', name: 'sov_admin_account_profile')] | |||
public function profile(Request $request): Response | |||
{ | |||
$user = $this->getUser(); | |||
@@ -52,9 +50,7 @@ class AccountAdminController extends AbstractController | |||
); | |||
} | |||
/** | |||
* @Route("/admin/account/password", name="sov_admin_account_password") | |||
*/ | |||
#[Route(path: '/admin/account/password', name: 'sov_admin_account_password')] | |||
public function changePassword(Request $request, UserPasswordHasherInterface $passwordEncoder): Response | |||
{ | |||
$user = $this->getUser(); |
@@ -11,16 +11,16 @@ trait BlameableTrait | |||
/** | |||
* @Gedmo\Blameable(on="create") | |||
* @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\User\UserInterface") | |||
* @ORM\JoinColumn(nullable=true, onDelete="SET NULL") | |||
*/ | |||
#[ORM\ManyToOne(targetEntity: 'Lc\SovBundle\Model\User\UserInterface')] | |||
#[ORM\JoinColumn(nullable: true, onDelete: 'SET NULL')] | |||
protected $createdBy; | |||
/** | |||
* @Gedmo\Blameable(on="update") | |||
* @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\User\UserInterface") | |||
* @ORM\JoinColumn(nullable=true, onDelete="SET NULL") | |||
*/ | |||
#[ORM\ManyToOne(targetEntity: 'Lc\SovBundle\Model\User\UserInterface')] | |||
#[ORM\JoinColumn(nullable: true, onDelete: 'SET NULL')] | |||
protected $updatedBy; | |||
@@ -7,9 +7,7 @@ use Doctrine\ORM\Mapping as ORM; | |||
trait DevAliasTrait | |||
{ | |||
/** | |||
* @ORM\Column(type="string", length=255, nullable=true) | |||
*/ | |||
#[ORM\Column(type: 'string', length: 255, nullable: true)] | |||
protected $devAlias; | |||
public function getDevAlias(): ?string |
@@ -7,9 +7,7 @@ use Doctrine\ORM\Mapping as ORM; | |||
trait ImageTrait | |||
{ | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\File\FileInterface", cascade={"persist", "remove"}, fetch="EAGER") | |||
*/ | |||
#[ORM\ManyToOne(targetEntity: 'Lc\SovBundle\Model\File\FileInterface', cascade: ['persist', 'remove'], fetch: 'EAGER')] | |||
protected $image; | |||
public function getImage(): ?File |
@@ -8,19 +8,13 @@ use Lc\SovBundle\Model\File\FileInterface; | |||
trait OpenGraphTrait | |||
{ | |||
/** | |||
* @ORM\Column(type="string", nullable=true) | |||
*/ | |||
#[ORM\Column(type: 'string', nullable: true)] | |||
protected $openGraphTitle; | |||
/** | |||
* @ORM\Column(type="text", nullable=true) | |||
*/ | |||
#[ORM\Column(type: 'text', nullable: true)] | |||
protected $openGraphDescription; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\File\FileInterface", cascade={"persist", "remove"}) | |||
*/ | |||
#[ORM\ManyToOne(targetEntity: 'Lc\SovBundle\Model\File\FileInterface', cascade: ['persist', 'remove'])] | |||
protected $openGraphImage; | |||
public function getOpenGraphTitle(): ?string |
@@ -6,22 +6,18 @@ use Doctrine\ORM\Mapping as ORM; | |||
trait SeoTrait | |||
{ | |||
/** | |||
* @ORM\Column(type="string", length=255, nullable=true) | |||
*/ | |||
#[ORM\Column(type: 'string', length: 255, nullable: true)] | |||
protected $metaTitle; | |||
/** | |||
* @ORM\Column(type="text", nullable=true) | |||
*/ | |||
#[ORM\Column(type: 'text', nullable: true)] | |||
protected $metaDescription; | |||
/** | |||
* @var array | |||
* @ORM\Column(type="array", nullable=true) | |||
*/ | |||
#[ORM\Column(type: 'array', nullable: true)] | |||
protected $oldUrls; | |||
@@ -8,9 +8,9 @@ use Gedmo\Mapping\Annotation as Gedmo; | |||
trait SluggableTrait | |||
{ | |||
/** | |||
* @ORM\Column(type="string", length=255) | |||
* @Gedmo\Slug(fields={"title"}, unique=true) | |||
*/ | |||
#[ORM\Column(type: 'string', length: 255)] | |||
protected $slug; | |||
public function getSlug(): ?string |
@@ -10,8 +10,8 @@ trait SortableTrait | |||
{ | |||
/** | |||
* @var string | |||
* @ORM\Column(type="float") | |||
*/ | |||
#[ORM\Column(type: 'float')] | |||
protected $position = 0; | |||
/** |
@@ -6,9 +6,7 @@ use Doctrine\ORM\Mapping as ORM; | |||
trait StatusTrait | |||
{ | |||
/** | |||
* @ORM\Column(type="float") | |||
*/ | |||
#[ORM\Column(type: 'float')] | |||
protected $status; | |||
public function getStatus(): ?float |
@@ -8,15 +8,15 @@ use Gedmo\Mapping\Annotation as Gedmo; | |||
trait TimestampableTrait | |||
{ | |||
/** | |||
* @ORM\Column(type="datetime") | |||
* @Gedmo\Timestampable(on="create") | |||
*/ | |||
#[ORM\Column(type: 'datetime')] | |||
protected $createdAt; | |||
/** | |||
* @ORM\Column(type="datetime") | |||
* @Gedmo\Timestampable(on="update") | |||
*/ | |||
#[ORM\Column(type: 'datetime')] | |||
protected $updatedAt; | |||
public function getCreatedAt(): ?\DateTimeInterface |
@@ -14,9 +14,7 @@ trait TranslatableTrait | |||
*/ | |||
protected $locale; | |||
/** | |||
* @ORM\Column(type="array", nullable=true) | |||
*/ | |||
#[ORM\Column(type: 'array', nullable: true)] | |||
protected $localesEnabled = []; | |||
public function __get($name) |
@@ -23,9 +23,7 @@ use Gedmo\Mapping\Annotation as Gedmo; | |||
use Lc\SovBundle\Doctrine\Extension\TimestampableTrait; | |||
/** | |||
* @ORM\MappedSuperclass | |||
*/ | |||
#[ORM\MappedSuperclass] | |||
abstract class AbstractFullEntity implements BlameableInterface, SeoInterface, OpenGraphInterface, SluggableInterface, SortableInterface, | |||
StatusInterface, TimestampableInterface, DevAliasInterface, EntityInterface | |||
{ | |||
@@ -41,14 +39,14 @@ abstract class AbstractFullEntity implements BlameableInterface, SeoInterface, O | |||
/** | |||
* @Gedmo\Translatable | |||
* @ORM\Column(type="string", length=255) | |||
*/ | |||
#[ORM\Column(type: 'string', length: 255)] | |||
protected $title; | |||
/** | |||
* @Gedmo\Translatable | |||
* @ORM\Column(type="text", nullable=true) | |||
*/ | |||
#[ORM\Column(type: 'text', nullable: true)] | |||
protected $description; | |||
@@ -13,9 +13,7 @@ use Doctrine\ORM\Mapping as ORM; | |||
use Gedmo\Mapping\Annotation as Gedmo; | |||
use Lc\SovBundle\Doctrine\Extension\TimestampableTrait; | |||
/** | |||
* @ORM\MappedSuperclass | |||
*/ | |||
#[ORM\MappedSuperclass] | |||
abstract class AbstractLightEntity implements BlameableInterface, TimestampableInterface, DevAliasInterface, | |||
EntityInterface | |||
{ |
@@ -6,23 +6,17 @@ use Symfony\Component\HttpFoundation\StreamedResponse; | |||
class CsvGenerator | |||
{ | |||
protected $arrayToExport; | |||
protected $arrayToExport = array(); | |||
protected $columns; | |||
protected $titleDocument; | |||
protected $titleDocument = 'csv_file'; | |||
protected $convertEncoding ; | |||
protected $fromEncoding ; | |||
protected $toEncoding ; | |||
protected $delimiter ; | |||
protected $convertEncoding = false ; | |||
protected $fromEncoding = 'UTF-8' ; | |||
protected $toEncoding = 'ISO-8859-1' ; | |||
protected $delimiter = ';' ; | |||
public function __construct() | |||
{ | |||
$this->arrayToExport = array(); | |||
$this->titleDocument = 'csv_file'; | |||
$this->convertEncoding = false ; | |||
$this->fromEncoding = 'UTF-8' ; | |||
$this->toEncoding = 'ISO-8859-1' ; | |||
$this->delimiter = ';' ; | |||
} | |||
public function enableConvertEncoding($toEncoding, $fromEncoding = null) |
@@ -1,4 +1,5 @@ | |||
<?php | |||
namespace Lc\SovBundle\Model\File; | |||
@@ -17,54 +18,51 @@ use Lc\SovBundle\Doctrine\Extension\TranslatableInterface; | |||
use Lc\SovBundle\Doctrine\Extension\TranslatableTrait; | |||
abstract class FileModel implements SortableInterface, BlameableInterface, TimestampableInterface, TranslatableInterface, | |||
DevAliasInterface, EntityInterface, FileInterface | |||
DevAliasInterface, EntityInterface, FileInterface | |||
{ | |||
use DevAliasTrait; | |||
use BlameableTrait; | |||
use TimestampableTrait; | |||
use TranslatableTrait; | |||
use SortableTrait; | |||
/** | |||
* @Gedmo\Translatable | |||
* @ORM\Column(type="string", length=255, nullable=true) | |||
*/ | |||
protected $path; | |||
/** | |||
* @Gedmo\Translatable | |||
* @ORM\Column(type="string", length=255, nullable=true) | |||
*/ | |||
protected $legend; | |||
public function __toString(){ | |||
return ''.$this->getLegend(); | |||
} | |||
public function getPath(): ?string | |||
{ | |||
return $this->path; | |||
} | |||
public function setPath(?string $path): self | |||
{ | |||
$this->path = $path; | |||
return $this; | |||
} | |||
public function getLegend(): ?string | |||
{ | |||
return $this->legend; | |||
} | |||
public function setLegend(?string $legend): self | |||
{ | |||
$this->legend = $legend; | |||
return $this; | |||
} | |||
use DevAliasTrait; | |||
use BlameableTrait; | |||
use TimestampableTrait; | |||
use TranslatableTrait; | |||
use SortableTrait; | |||
#[Gedmo\Translatable] | |||
#[ORM\Column(type: "string", length: 255, nullable: true)] | |||
protected $path; | |||
#[Gedmo\Translatable] | |||
#[ORM\Column(type: "string", length: 255, nullable: true)] | |||
protected $legend; | |||
public function __toString() | |||
{ | |||
return '' . $this->getLegend(); | |||
} | |||
public function getPath(): ?string | |||
{ | |||
return $this->path; | |||
} | |||
public function setPath(?string $path): self | |||
{ | |||
$this->path = $path; | |||
return $this; | |||
} | |||
public function getLegend(): ?string | |||
{ | |||
return $this->legend; | |||
} | |||
public function setLegend(?string $legend): self | |||
{ | |||
$this->legend = $legend; | |||
return $this; | |||
} | |||
} |
@@ -8,20 +8,14 @@ use Doctrine\Common\Collections\Collection; | |||
use Lc\SovBundle\Doctrine\Pattern\AbstractFullEntity; | |||
use Lc\SovBundle\Model\User\UserInterface; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
#[ORM\MappedSuperclass] | |||
abstract class NewsletterModel extends AbstractFullEntity implements NewsletterInterface | |||
{ | |||
/** | |||
* @ORM\ManyToMany(targetEntity="Lc\SovBundle\Model\User\UserInterface", mappedBy="newsletters") | |||
*/ | |||
#[ORM\ManyToMany(targetEntity:"Lc\SovBundle\Model\User\UserInterface", mappedBy:"newsletters")] | |||
protected $users; | |||
/** | |||
* @ORM\Column(type="boolean", nullable=true) | |||
*/ | |||
#[ORM\Column(type:"boolean", nullable:true)] | |||
protected $isMain; | |||
public function __toString() |
@@ -9,9 +9,7 @@ use Lc\SovBundle\Doctrine\EntityInterface; | |||
use Lc\SovBundle\Doctrine\Pattern\AbstractLightEntity; | |||
use Lc\SovBundle\Model\User\UserInterface; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
#[ORM\MappedSuperclass] | |||
abstract class ReminderModel extends AbstractLightEntity implements ReminderInterface, EntityInterface | |||
{ | |||
/** | |||
@@ -19,51 +17,34 @@ abstract class ReminderModel extends AbstractLightEntity implements ReminderInte | |||
*/ | |||
protected $relatedPage; | |||
/** | |||
* @ORM\Column(type="string", length=255) | |||
*/ | |||
#[ORM\Column(type: 'string', length: 255)] | |||
protected $title; | |||
/** | |||
* @ORM\Column(type="text", nullable=true) | |||
*/ | |||
#[ORM\Column(type: 'text', nullable: true)] | |||
protected $description; | |||
/** | |||
* @ORM\Column(type="string", length=64, nullable=true) | |||
*/ | |||
#[ORM\Column(type: 'string', length: 64, nullable: true)] | |||
protected $crudAction; | |||
/** | |||
* @ORM\Column(type="string", length=255, nullable=true) | |||
*/ | |||
#[ORM\Column(type: 'string', length: 255, nullable: true)] | |||
protected $crudControllerFqcn; | |||
/** | |||
* @ORM\Column(type="integer", nullable=true) | |||
*/ | |||
#[ORM\Column(type: 'integer', nullable: true)] | |||
protected $entityId; | |||
/** | |||
* @ORM\ManyToMany(targetEntity="Lc\SovBundle\Model\User\UserInterface") | |||
*/ | |||
#[ORM\ManyToMany(targetEntity: 'Lc\SovBundle\Model\User\UserInterface')] | |||
protected $users; | |||
/** | |||
* @ORM\Column(type="date", nullable=true) | |||
*/ | |||
#[ORM\Column(type: 'date', nullable: true)] | |||
protected $dateReminder; | |||
/** | |||
* @ORM\Column(type="boolean", nullable=false) | |||
*/ | |||
protected $done; | |||
#[ORM\Column(type: 'boolean', nullable: false)] | |||
protected $done = false; | |||
public function __construct() | |||
{ | |||
$this->users = new ArrayCollection(); | |||
$this->done = false; | |||
} | |||
public function getTitle(): ?string |
@@ -5,29 +5,19 @@ namespace Lc\SovBundle\Model\Setting; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\SovBundle\Model\File\FileInterface; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
#[ORM\MappedSuperclass] | |||
abstract class SettingModel implements SettingInterface | |||
{ | |||
/** | |||
* @ORM\Column(type="string", length=63, nullable=true) | |||
*/ | |||
#[ORM\Column(type: 'string', length: 63, nullable: true)] | |||
protected $name; | |||
/** | |||
* @ORM\Column(type="text", nullable=true) | |||
*/ | |||
#[ORM\Column(type: 'text', nullable: true)] | |||
protected $text; | |||
/** | |||
* @ORM\Column(type="datetime", nullable=true) | |||
*/ | |||
#[ORM\Column(type: 'datetime', nullable: true)] | |||
protected $date; | |||
/** | |||
* @ORM\ManyToOne(targetEntity=FileInterface::class, cascade={"persist", "remove"}) | |||
*/ | |||
#[ORM\ManyToOne(targetEntity: FileInterface::class, cascade: ['persist', 'remove'])] | |||
protected $file; | |||
public function getName(): ?string |
@@ -8,10 +8,8 @@ use Lc\SovBundle\Model\Site\SiteInterface; | |||
abstract class SiteSettingModel extends SettingModel implements SiteSettingInterface, EntityInterface | |||
{ | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\Site\SiteInterface", inversedBy="settings") | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
#[ORM\ManyToOne(targetEntity:"Lc\SovBundle\Model\Site\SiteInterface", inversedBy: "settings")] | |||
#[ORM\JoinColumn(nullable: false)] | |||
protected $site; | |||
public function getSite(): ?SiteInterface |
@@ -10,30 +10,20 @@ use Lc\SovBundle\Doctrine\Pattern\AbstractFullEntity; | |||
use Lc\SovBundle\Model\File\FileInterface; | |||
use Lc\SovBundle\Model\Newsletter\NewsletterInterface; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
#[ORM\MappedSuperclass()] | |||
abstract class NewsModel extends AbstractFullEntity implements NewsInterface | |||
{ | |||
/** | |||
* @ORM\Column(type="datetime") | |||
* @Gedmo\Timestampable(on="create") | |||
*/ | |||
#[ORM\Column(type: "datetime")] | |||
#[Gedmo\Timestampable(on: "create")] | |||
protected $date; | |||
/** | |||
* @ORM\Column(type="boolean", nullable=true) | |||
*/ | |||
#[ORM\Column(type: "boolean", nullable: true)] | |||
protected $isSent; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\Newsletter\NewsletterInterface") | |||
*/ | |||
#[ORM\ManyToOne(targetEntity: "Lc\SovBundle\Model\Newsletter\NewsletterInterface")] | |||
protected $newsletter; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\File\FileInterface", cascade={"persist", "remove"}) | |||
*/ | |||
#[ORM\ManyToOne(targetEntity: "Lc\SovBundle\Model\Newsletter\FileInterface", cascade: ["persist", "remove"])] | |||
protected $image; | |||
public function __toString() |
@@ -5,9 +5,7 @@ namespace Lc\SovBundle\Model\Site; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\SovBundle\Doctrine\Pattern\AbstractFullEntity; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
#[ORM\MappedSuperclass] | |||
abstract class PageModel extends AbstractFullEntity implements PageInterface | |||
{ | |||
@@ -14,9 +14,7 @@ abstract class SiteModel implements SiteInterface, EntityInterface, DevAliasInte | |||
{ | |||
use DevAliasTrait; | |||
/** | |||
* @ORM\OneToMany(targetEntity="Lc\SovBundle\Model\Setting\SiteSettingInterface", mappedBy="site", orphanRemoval=true, cascade={"persist"}, fetch="EAGER") | |||
*/ | |||
#[ORM\OneToMany(targetEntity:"Lc\SovBundle\Model\Setting\SiteSettingInterface", mappedBy:"site", orphanRemoval:true, cascade:['persist'], fetch:"EAGER")] | |||
protected $settings; | |||
public function __construct() |
@@ -10,32 +10,22 @@ use Lc\SovBundle\Doctrine\Extension\StatusInterface; | |||
use Lc\SovBundle\Doctrine\Extension\StatusTrait; | |||
use Lc\SovBundle\Doctrine\Pattern\AbstractLightEntity; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
#[ORM\MappedSuperclass] | |||
abstract class TicketMessageModel extends AbstractLightEntity implements TicketMessageInterface, EntityInterface, StatusInterface | |||
{ | |||
use StatusTrait; | |||
/** | |||
* @ORM\Column(type="text") | |||
*/ | |||
#[ORM\Column(type: 'text')] | |||
protected $message; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\Ticket\TicketInterface", inversedBy="ticketMessages") | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
#[ORM\ManyToOne(targetEntity: 'Lc\SovBundle\Model\Ticket\TicketInterface', inversedBy: 'ticketMessages')] | |||
#[ORM\JoinColumn(nullable: false)] | |||
protected $ticket; | |||
/** | |||
* @ORM\Column(type="boolean", nullable=true) | |||
*/ | |||
#[ORM\Column(type: 'boolean', nullable: true)] | |||
protected $answerByAdmin; | |||
/** | |||
* @ORM\Column(type="string", length=255, nullable=true) | |||
*/ | |||
#[ORM\Column(type: "string", length: 255, nullable: true)] | |||
protected $imageFilename; | |||
public function __toString() |
@@ -11,9 +11,7 @@ use Lc\SovBundle\Doctrine\Extension\BlameableNullableTrait; | |||
use Lc\SovBundle\Doctrine\Pattern\AbstractLightEntity; | |||
use Lc\SovBundle\Model\User\UserInterface; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
#[ORM\MappedSuperclass] | |||
abstract class TicketModel extends AbstractLightEntity implements TicketInterface, EntityInterface | |||
{ | |||
@@ -25,55 +23,35 @@ abstract class TicketModel extends AbstractLightEntity implements TicketInterfac | |||
const TICKET_STATUS_PROCESSED = 'processed'; | |||
const TICKET_STATUS_CLOSED = 'closed'; | |||
/** | |||
* @ORM\Column(type="string", length=32) | |||
*/ | |||
#[ORM\Column(type: 'string', length: 32)] | |||
protected $type; | |||
/** | |||
* @ORM\Column(type="string", length=32) | |||
*/ | |||
#[ORM\Column(type: 'string', length: 32)] | |||
protected $status = self::TICKET_STATUS_OPEN; | |||
/** | |||
* @ORM\Column(type="string", length=255) | |||
*/ | |||
#[ORM\Column(type: 'string', length: 255)] | |||
protected $subject; | |||
/** | |||
* @ORM\Column(type="array", nullable=true) | |||
*/ | |||
#[ORM\Column(type: 'array', nullable: true)] | |||
protected $tags = []; | |||
/** | |||
* @ORM\Column(type="string", length=64, nullable=true) | |||
*/ | |||
#[ORM\Column(type: 'string', length: 64, nullable: true)] | |||
protected $visitorFirstname; | |||
/** | |||
* @ORM\Column(type="string", length=64, nullable=true) | |||
*/ | |||
#[ORM\Column(type: 'string', length: 64, nullable: true)] | |||
protected $visitorLastname; | |||
/** | |||
* @ORM\Column(type="string", length=128, nullable=true) | |||
*/ | |||
#[ORM\Column(type: 'string', length: 128, nullable: true)] | |||
protected $visitorEmail; | |||
/** | |||
* @ORM\Column(type="string", length=255, nullable=true) | |||
*/ | |||
#[ORM\Column(type: "string", length: 255, nullable: true)] | |||
protected $visitorToken; | |||
/** | |||
* @ORM\OneToMany(targetEntity="Lc\SovBundle\Model\Ticket\TicketMessageInterface", mappedBy="ticket",cascade={"persist", "remove"}, orphanRemoval=true) | |||
* @ORM\OrderBy({"id" = "ASC"}) | |||
*/ | |||
#[ORM\OneToMany(targetEntity: 'Lc\SovBundle\Model\Ticket\TicketMessageInterface', mappedBy: 'ticket', cascade: ['persist', 'remove'], orphanRemoval: true)] | |||
#[ORM\OrderBy(['id' => 'ASC'])] | |||
protected $ticketMessages; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\User\UserInterface", inversedBy="tickets") | |||
*/ | |||
#[ORM\ManyToOne(targetEntity: 'Lc\SovBundle\Model\User\UserInterface', inversedBy: 'tickets')] | |||
protected $user; | |||
@@ -9,15 +9,11 @@ use Lc\SovBundle\Doctrine\EntityInterface; | |||
use Lc\SovBundle\Doctrine\Pattern\AbstractFullEntity; | |||
use Lc\SovBundle\Doctrine\Pattern\AbstractLightEntity; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
#[ORM\MappedSuperclass] | |||
abstract class GroupUserModel extends AbstractFullEntity implements GroupUserInterface, EntityInterface | |||
{ | |||
/** | |||
* @ORM\ManyToMany(targetEntity="Lc\SovBundle\Model\User\UserInterface", mappedBy="groupUsers") | |||
*/ | |||
#[ORM\ManyToMany(targetEntity: 'Lc\SovBundle\Model\User\UserInterface', mappedBy: 'groupUsers')] | |||
protected $users; | |||
@@ -14,78 +14,52 @@ use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface; | |||
use Symfony\Component\Security\Core\User\UserInterface; | |||
use Lc\SovBundle\Model\User\UserInterface as SovUserInterface; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
#[ORM\MappedSuperclass] | |||
abstract class UserModel implements EntityInterface, UserInterface, SovUserInterface, DevAliasInterface, PasswordAuthenticatedUserInterface | |||
{ | |||
use DevAliasTrait; | |||
use TimestampableTrait; | |||
/** | |||
* @ORM\Column(type="string", length=180, unique=true) | |||
*/ | |||
#[ORM\Column(type: 'string', length: 180, unique: true)] | |||
protected $email; | |||
/** | |||
* @ORM\Column(type="json") | |||
*/ | |||
#[ORM\Column(type: 'json')] | |||
protected $roles = []; | |||
/** | |||
* @var string The hashed password | |||
* @ORM\Column(type="string") | |||
*/ | |||
#[ORM\Column(type: 'string')] | |||
protected $password; | |||
/** | |||
* @ORM\Column(type="string", length=255, nullable=true) | |||
*/ | |||
#[ORM\Column(type: "string", length: 255, nullable: true)] | |||
protected $lastname; | |||
/** | |||
* @ORM\Column(type="string", length=255, nullable=true) | |||
*/ | |||
#[ORM\Column(type: "string", length: 255, nullable: true)] | |||
protected $firstname; | |||
/** | |||
* @ORM\Column(type="string", length=20, nullable=true) | |||
*/ | |||
#[ORM\Column(type: 'string', length: 20, nullable: true)] | |||
protected $phone; | |||
/** | |||
* @ORM\Column(type="boolean", nullable=true) | |||
*/ | |||
#[ORM\Column(type: 'boolean', nullable: true)] | |||
protected $gender; | |||
/** | |||
* @ORM\Column(type="date", nullable=true) | |||
*/ | |||
#[ORM\Column(type: 'date', nullable: true)] | |||
protected $birthdate; | |||
/** | |||
* @ORM\Column(type="boolean") | |||
*/ | |||
#[ORM\Column(type: 'boolean')] | |||
protected $isVerified = false; | |||
/** | |||
* @ORM\ManyToMany(targetEntity="Lc\SovBundle\Model\User\GroupUserInterface", inversedBy="users") | |||
*/ | |||
#[ORM\ManyToMany(targetEntity: 'Lc\SovBundle\Model\User\GroupUserInterface', inversedBy: 'users')] | |||
protected $groupUsers; | |||
/** | |||
* @ORM\OneToMany(targetEntity="Lc\SovBundle\Model\Ticket\TicketInterface", mappedBy="user", cascade={"remove"}) | |||
*/ | |||
#[ORM\OneToMany(targetEntity: 'Lc\SovBundle\Model\Ticket\TicketInterface', mappedBy: 'user', cascade: ['remove'])] | |||
protected $tickets; | |||
/** | |||
* @ORM\Column(type="array", nullable=true) | |||
*/ | |||
#[ORM\Column(type: 'array', nullable: true)] | |||
protected $ticketTypesNotification = []; | |||
/** | |||
* @ORM\Column(type="datetime", nullable=true) | |||
*/ | |||
#[ORM\Column(type: 'datetime', nullable: true)] | |||
protected $lastLogin; | |||
public function __construct() |