use Doctrine\ORM\EntityManagerInterface; | use Doctrine\ORM\EntityManagerInterface; | ||||
use Lc\SovBundle\Doctrine\EntityInterface; | use Lc\SovBundle\Doctrine\EntityInterface; | ||||
use Lc\SovBundle\Doctrine\Extension\BlameableInterface; | use Lc\SovBundle\Doctrine\Extension\BlameableInterface; | ||||
use Lc\SovBundle\Factory\User\UserFactory; | |||||
use Lc\SovBundle\Model\Newsletter\NewsletterInterface; | use Lc\SovBundle\Model\Newsletter\NewsletterInterface; | ||||
use Lc\SovBundle\Model\User\UserInterface; | use Lc\SovBundle\Model\User\UserInterface; | ||||
use Lc\SovBundle\Repository\User\UserStore; | use Lc\SovBundle\Repository\User\UserStore; | ||||
protected EntityManagerInterface $entityManager; | protected EntityManagerInterface $entityManager; | ||||
protected UserStore $userStore; | protected UserStore $userStore; | ||||
protected UserSolver $userSolver; | protected UserSolver $userSolver; | ||||
public function __construct(EntityManagerInterface $entityManager, UserStore $userStore, UserSolver $userSolver) | |||||
protected UserFactory $userFactory; | |||||
public function __construct(EntityManagerInterface $entityManager, UserStore $userStore, UserSolver $userSolver, UserFactory $userFactory) | |||||
{ | { | ||||
$this->entityManager = $entityManager; | $this->entityManager = $entityManager; | ||||
$this->userStore = $userStore; | $this->userStore = $userStore; | ||||
$this->userSolver = $userSolver; | $this->userSolver = $userSolver; | ||||
$this->userFactory = $userFactory; | |||||
} | |||||
public function create( string $email, string $password, array $roles=[]) | |||||
{ | |||||
$user = $this->userFactory->create(); | |||||
$user->setEmail($email); | |||||
$user->setPassword($password); | |||||
$user->setRoles($roles); | |||||
$this->entityManager->create($user); | |||||
$this->entityManager->flush(); | |||||
return $user; | |||||
} | } | ||||
public function setNewsletter(UserInterface $user, NewsletterInterface $newsletter, bool $subscribeNewsletter): void | public function setNewsletter(UserInterface $user, NewsletterInterface $newsletter, bool $subscribeNewsletter): void | ||||
return $entity; | return $entity; | ||||
} | } | ||||
public function initBlameableUpdatedSystem(EntityInterface $entity) | public function initBlameableUpdatedSystem(EntityInterface $entity) | ||||
{ | { | ||||
$userSystem = $this->userStore->getOneByDevAlias('system'); | $userSystem = $this->userStore->getOneByDevAlias('system'); |
{ | { | ||||
// général | // général | ||||
$this->addSettingSelect( | $this->addSettingSelect( | ||||
[ | |||||
'category' => self::CATEGORY_GENERAL, | |||||
'name' => self::SETTING_MAINTENANCE, | |||||
'choices' => [ | |||||
'Non' => 0, | |||||
'Oui' => 1, | |||||
] | |||||
[ | |||||
'category' => self::CATEGORY_GENERAL, | |||||
'name' => self::SETTING_MAINTENANCE, | |||||
'choices' => [ | |||||
'Non' => 0, | |||||
'Oui' => 1, | |||||
] | ] | ||||
] | |||||
); | ); | ||||
$this->addSettingText( | $this->addSettingText( | ||||
[ | |||||
'category' => self::CATEGORY_GENERAL, | |||||
'name' => self::SETTING_MAINTENANCE_IP_AUTHORIZED, | |||||
] | |||||
[ | |||||
'category' => self::CATEGORY_GENERAL, | |||||
'name' => self::SETTING_MAINTENANCE_IP_AUTHORIZED, | |||||
] | |||||
); | ); | ||||
} | } | ||||
public function getCategories() | |||||
public function getCategories(): array | |||||
{ | { | ||||
return [ | return [ | ||||
self::CATEGORY_GENERAL, | |||||
self::CATEGORY_GENERAL, | |||||
]; | ]; | ||||
} | } | ||||
interface SiteSettingDefinitionInterface | interface SiteSettingDefinitionInterface | ||||
{ | { | ||||
public function getCategories(): array; | |||||
} | } |
namespace Lc\SovBundle\Doctrine\Extension; | namespace Lc\SovBundle\Doctrine\Extension; | ||||
use Lc\SovBundle\Model\User\UserInterface; | |||||
interface BlameableInterface | interface BlameableInterface | ||||
{ | { | ||||
public function getCreatedBy(): ?UserInterface; | |||||
public function setCreatedBy(?UserInterface $createdBy): BlameableInterface; | |||||
public function getUpdatedBy(): ?UserInterface; | |||||
public function setUpdatedBy(?UserInterface $updatedBy): BlameableInterface; | |||||
} | } |
interface DevAliasInterface | interface DevAliasInterface | ||||
{ | { | ||||
public function getDevAlias(): ?string; | |||||
public function setDevAlias(?string $devAlias): DevAliasInterface; | |||||
} | } |
namespace Lc\SovBundle\Doctrine\Extension; | namespace Lc\SovBundle\Doctrine\Extension; | ||||
use Lc\SovBundle\Model\File\FileInterface; | |||||
interface OpenGraphInterface | interface OpenGraphInterface | ||||
{ | { | ||||
public function getOpenGraphTitle(): ?string; | |||||
public function setOpenGraphTitle(string $openGraphTitle): OpenGraphInterface; | |||||
public function getOpenGraphDescription(): ?string; | |||||
public function setOpenGraphDescription(?string $openGraphDescription): OpenGraphInterface; | |||||
public function getOpenGraphImage(): ?FileInterface; | |||||
public function setOpenGraphImage(?FileInterface $openGraphImage); | |||||
} | } |
} | } | ||||
public function getOpenGraphImage(): ?FileModel | |||||
public function getOpenGraphImage(): ?FileInterface | |||||
{ | { | ||||
return $this->openGraphImage; | return $this->openGraphImage; | ||||
} | } | ||||
public function setOpenGraphImage(?FileModel $openGraphImage): self | |||||
public function setOpenGraphImage(?FileInterface $openGraphImage): self | |||||
{ | { | ||||
$this->openGraphImage = $openGraphImage; | $this->openGraphImage = $openGraphImage; | ||||
interface SeoInterface | interface SeoInterface | ||||
{ | { | ||||
public function getMetaTitle(): ?string; | |||||
public function setMetaTitle(?string $metaTitle): SeoInterface; | |||||
public function getMetaDescription(): ?string; | |||||
public function setMetaDescription(?string $metaDescription): SeoInterface; | |||||
public function getOldUrls(): ?array; | |||||
public function setOldUrls($oldUrls): SeoInterface; | |||||
} | } |
interface SluggableInterface | interface SluggableInterface | ||||
{ | { | ||||
public function getSlug(): ?string; | |||||
public function setSlug(?string $slug): SluggableInterface; | |||||
} | } |
interface SortableInterface | interface SortableInterface | ||||
{ | { | ||||
public function getPosition(): float; | |||||
public function setPosition(float $position): SortableInterface; | |||||
public function clearPosition(): SortableInterface; | |||||
} | } |
interface StatusInterface | interface StatusInterface | ||||
{ | { | ||||
public function getStatus(): ?float; | |||||
public function setStatus(float $status): StatusInterface; | |||||
} | } |
interface TimestampableInterface | interface TimestampableInterface | ||||
{ | { | ||||
public function getCreatedAt(): ?\DateTimeInterface; | |||||
public function setCreatedAt(\DateTimeInterface $createdAt): TimestampableInterface; | |||||
public function getUpdatedAt(): ?\DateTimeInterface; | |||||
public function setUpdatedAt(\DateTimeInterface $updatedAt): TimestampableInterface; | |||||
} | } |
interface TranslatableInterface | interface TranslatableInterface | ||||
{ | { | ||||
public function setTranslatableLocale($locale); | |||||
public function getLocalesEnabled(): ?array; | |||||
public function setLocalesEnabled(?array $localesEnabled): TranslatableInterface; | |||||
} | } |
namespace Lc\SovBundle\Factory\Reminder; | namespace Lc\SovBundle\Factory\Reminder; | ||||
use Lc\SovBundle\Model\Reminder\ReminderInterface; | |||||
interface ReminderFactoryInterface | interface ReminderFactoryInterface | ||||
{ | { | ||||
public function create( | |||||
string $crudAction = null, | |||||
string $crudControllerFqcn = null, | |||||
int $entityId = null | |||||
): ReminderInterface; | |||||
} | } |
namespace Lc\SovBundle\Factory\Setting; | namespace Lc\SovBundle\Factory\Setting; | ||||
use Lc\SovBundle\Model\File\FileInterface; | |||||
use Lc\SovBundle\Model\Setting\SiteSettingInterface; | |||||
use Lc\SovBundle\Model\Site\SiteInterface; | |||||
interface SiteSettingFactoryInterface | interface SiteSettingFactoryInterface | ||||
{ | { | ||||
public function create( | |||||
SiteInterface $site, | |||||
string $name, | |||||
string $text = null, | |||||
\DateTime $date = null, | |||||
FileInterface $file = null | |||||
): SiteSettingInterface; | |||||
} | } |
namespace Lc\SovBundle\Factory\Site; | namespace Lc\SovBundle\Factory\Site; | ||||
use Lc\SovBundle\Model\Site\NewsInterface; | |||||
interface NewsFactoryInterface | interface NewsFactoryInterface | ||||
{ | { | ||||
public function create(): NewsInterface; | |||||
} | } |
namespace Lc\SovBundle\Factory\Site; | namespace Lc\SovBundle\Factory\Site; | ||||
use Lc\SovBundle\Model\Site\PageInterface; | |||||
interface PageFactoryInterface | interface PageFactoryInterface | ||||
{ | { | ||||
public function create(): PageInterface; | |||||
} | } |
namespace Lc\SovBundle\Factory\Site; | namespace Lc\SovBundle\Factory\Site; | ||||
use Lc\SovBundle\Model\Site\SiteInterface; | |||||
interface SiteFactoryInterface | interface SiteFactoryInterface | ||||
{ | { | ||||
public function create(string $devAlias = null): SiteInterface; | |||||
} | } |
namespace Lc\SovBundle\Factory\Ticket; | namespace Lc\SovBundle\Factory\Ticket; | ||||
use Lc\SovBundle\Model\Ticket\TicketInterface; | |||||
interface TicketFactoryInterface | interface TicketFactoryInterface | ||||
{ | { | ||||
public function create(): TicketInterface; | |||||
} | } |
namespace Lc\SovBundle\Factory\Ticket; | namespace Lc\SovBundle\Factory\Ticket; | ||||
use Lc\SovBundle\Model\Ticket\TicketInterface; | |||||
use Lc\SovBundle\Model\Ticket\TicketMessageInterface; | |||||
interface TicketMessageFactoryInterface | interface TicketMessageFactoryInterface | ||||
{ | { | ||||
public function create(TicketInterface $ticket): TicketMessageInterface; | |||||
} | } |
namespace Lc\SovBundle\Factory\User; | namespace Lc\SovBundle\Factory\User; | ||||
use Lc\SovBundle\Model\User\GroupUserInterface; | |||||
interface GroupUserFactoryInterface | interface GroupUserFactoryInterface | ||||
{ | { | ||||
public function create(): GroupUserInterface; | |||||
} | } |
namespace Lc\SovBundle\Factory\User; | namespace Lc\SovBundle\Factory\User; | ||||
use Lc\SovBundle\Model\User\UserInterface; | |||||
interface UserFactoryInterface | interface UserFactoryInterface | ||||
{ | { | ||||
public function create(): UserInterface; | |||||
} | } |
namespace Lc\SovBundle\Model\File; | namespace Lc\SovBundle\Model\File; | ||||
use Lc\SovBundle\Model\User\UserInterface; | |||||
interface FileInterface | interface FileInterface | ||||
{ | { | ||||
public function getCreatedBy(): ?UserInterface; | |||||
public function setCreatedBy(?UserInterface $createdBy): FileInterface; | |||||
public function getUpdatedBy(): ?UserInterface; | |||||
public function setUpdatedBy(?UserInterface $updatedBy): FileInterface; | |||||
public function getDevAlias(): ?string; | |||||
public function setDevAlias(?string $devAlias): FileInterface; | |||||
public function getPath(): ?string; | |||||
public function setPath(?string $path): FileInterface; | |||||
public function getLegend(): ?string; | |||||
public function setLegend(?string $legend): FileInterface; | |||||
/** | |||||
* @return float | |||||
*/ | |||||
public function getPosition(): float; | |||||
/** | |||||
* @param float $position | |||||
* @return $this | |||||
*/ | |||||
public function setPosition(float $position): FileInterface; | |||||
public function clearPosition(): FileInterface; | |||||
public function getCreatedAt(): ?\DateTimeInterface; | |||||
public function setCreatedAt(\DateTimeInterface $createdAt): FileInterface; | |||||
public function getUpdatedAt(): ?\DateTimeInterface; | |||||
public function setUpdatedAt(\DateTimeInterface $updatedAt): FileInterface; | |||||
public function setTranslatableLocale($locale); | |||||
public function getLocalesEnabled(): ?array; | |||||
} | |||||
public function setLocalesEnabled(?array $localesEnabled): FileInterface; | |||||
} |
<?php | <?php | ||||
namespace Lc\SovBundle\Model\Newsletter ; | |||||
namespace Lc\SovBundle\Model\Newsletter; | |||||
use Doctrine\Common\Collections\Collection; | |||||
use Lc\SovBundle\Model\User\UserInterface; | |||||
interface NewsletterInterface | interface NewsletterInterface | ||||
{ | { | ||||
public function getTitle(): ?string; | |||||
public function setTitle(string $title); | |||||
public function getDescription(): ?string; | |||||
public function setDescription(?string $description); | |||||
public function getCreatedBy(): ?UserInterface; | |||||
public function setCreatedBy(?UserInterface $createdBy); | |||||
public function getUpdatedBy(): ?UserInterface; | |||||
public function setUpdatedBy(?UserInterface $updatedBy); | |||||
public function getDevAlias(): ?string; | |||||
public function setDevAlias(?string $devAlias); | |||||
/** | |||||
* @return Collection|UserInterface[] | |||||
*/ | |||||
public function getUsers(): Collection; | |||||
public function addUser(UserInterface $user): NewsletterInterface; | |||||
public function removeUser(UserInterface $user): NewsletterInterface; | |||||
public function getIsMain(): ?bool; | |||||
public function setIsMain(?bool $isMain): NewsletterInterface; | |||||
public function getMetaTitle(): ?string; | |||||
public function setMetaTitle(?string $metaTitle); | |||||
public function getMetaDescription(): ?string; | |||||
public function setMetaDescription(?string $metaDescription); | |||||
public function setOldUrls($oldUrls); | |||||
public function getOldUrls(): ?array; | |||||
public function getSlug(): ?string; | |||||
public function setSlug(?string $slug); | |||||
/** | |||||
* @return float | |||||
*/ | |||||
public function getPosition(): float; | |||||
/** | |||||
* @param float $position | |||||
* @return $this | |||||
*/ | |||||
public function setPosition(float $position); | |||||
public function clearPosition(); | |||||
public function getStatus(): ?float; | |||||
public function setStatus(float $status); | |||||
public function getCreatedAt(): ?\DateTimeInterface; | |||||
public function setCreatedAt(\DateTimeInterface $createdAt); | |||||
public function getUpdatedAt(): ?\DateTimeInterface; | |||||
public function setUpdatedAt(\DateTimeInterface $updatedAt); | |||||
} | } |
namespace Lc\SovBundle\Model\Reminder; | namespace Lc\SovBundle\Model\Reminder; | ||||
use Doctrine\Common\Collections\Collection; | |||||
use Lc\SovBundle\Model\User\UserInterface; | |||||
interface ReminderInterface | interface ReminderInterface | ||||
{ | { | ||||
} | |||||
public function getCreatedBy(): ?UserInterface; | |||||
public function setCreatedBy(?UserInterface $createdBy); | |||||
public function getUpdatedBy(): ?UserInterface; | |||||
public function setUpdatedBy(?UserInterface $updatedBy); | |||||
public function getDevAlias(): ?string; | |||||
public function setDevAlias(?string $devAlias); | |||||
public function getTitle(): ?string; | |||||
public function setTitle(string $title): ReminderInterface; | |||||
public function getDescription(): ?string; | |||||
public function setDescription(?string $description): ReminderInterface; | |||||
public function getCrudAction(): ?string; | |||||
public function setCrudAction(?string $crudAction): ReminderInterface; | |||||
public function getCrudControllerFqcn(): ?string; | |||||
public function setCrudControllerFqcn(?string $crudControllerFqcn): ReminderInterface; | |||||
public function getEntityId(): ?int; | |||||
public function setEntityId(?int $entityId): ReminderInterface; | |||||
/** | |||||
* @return Collection|UserInterface[] | |||||
*/ | |||||
public function getUsers(): Collection; | |||||
public function addUser(UserInterface $user): ReminderInterface; | |||||
public function removeUser(UserInterface $user): ReminderInterface; | |||||
public function getDateReminder(): ?\DateTimeInterface; | |||||
public function setDateReminder(?\DateTimeInterface $dateReminder): ReminderInterface; | |||||
public function getDone(): ?bool; | |||||
public function setDone(?bool $done): ReminderInterface; | |||||
public function getCreatedAt(): ?\DateTimeInterface; | |||||
public function setCreatedAt(\DateTimeInterface $createdAt); | |||||
public function getUpdatedAt(): ?\DateTimeInterface; | |||||
public function setUpdatedAt(\DateTimeInterface $updatedAt); | |||||
} |
namespace Lc\SovBundle\Model\Setting; | namespace Lc\SovBundle\Model\Setting; | ||||
use Lc\SovBundle\Model\File\FileInterface; | |||||
interface SettingInterface | interface SettingInterface | ||||
{ | { | ||||
public function getName(): ?string; | |||||
public function setName(?string $name): SettingInterface; | |||||
public function getText(): ?string; | |||||
public function setText($text): SettingInterface; | |||||
public function getDate(): ?\DateTimeInterface; | |||||
public function setDate(?\DateTimeInterface $date): SettingInterface; | |||||
public function getFile(): ?FileInterface; | |||||
public function setFile(?FileInterface $file): SettingInterface; | |||||
} | } |
namespace Lc\SovBundle\Model\Setting; | namespace Lc\SovBundle\Model\Setting; | ||||
use Lc\SovBundle\Model\File\FileInterface; | |||||
use Lc\SovBundle\Model\Site\SiteInterface; | |||||
interface SiteSettingInterface | interface SiteSettingInterface | ||||
{ | { | ||||
public function getName(): ?string; | |||||
public function setName(?string $name); | |||||
public function getText(): ?string; | |||||
public function setText($text); | |||||
public function getDate(): ?\DateTimeInterface; | |||||
public function setDate(?\DateTimeInterface $date); | |||||
public function getFile(): ?FileInterface; | |||||
public function setFile(?FileInterface $file); | |||||
public function getSite(): ?SiteInterface; | |||||
public function setSite(?SiteInterface $site): SiteSettingInterface; | |||||
} | } |
<?php | <?php | ||||
namespace Lc\SovBundle\Model\Site ; | |||||
namespace Lc\SovBundle\Model\Site; | |||||
use Lc\SovBundle\Model\File\FileInterface; | |||||
use Lc\SovBundle\Model\File\FileModel; | |||||
use Lc\SovBundle\Model\Newsletter\NewsletterInterface; | |||||
use Lc\SovBundle\Model\User\UserInterface; | |||||
interface NewsInterface | interface NewsInterface | ||||
{ | { | ||||
public function getTitle(): ?string; | |||||
public function setTitle(string $title); | |||||
public function getDescription(): ?string; | |||||
public function setDescription(?string $description); | |||||
public function getCreatedBy(): ?UserInterface; | |||||
public function setCreatedBy(?UserInterface $createdBy); | |||||
public function getUpdatedBy(): ?UserInterface; | |||||
public function setUpdatedBy(?UserInterface $updatedBy); | |||||
public function getDevAlias(): ?string; | |||||
public function setDevAlias(?string $devAlias); | |||||
public function getDate(): ?\DateTimeInterface; | |||||
public function setDate(\DateTimeInterface $date): NewsInterface; | |||||
public function getIsSent(): ?bool; | |||||
public function setIsSent(?bool $isSent): NewsInterface; | |||||
public function getImage(): ?FileInterface; | |||||
public function setImage(?FileInterface $image): NewsInterface; | |||||
public function getNewsletter(): ?NewsletterInterface; | |||||
public function setNewsletter(?NewsletterInterface $newsletter): NewsInterface; | |||||
public function getOpenGraphTitle(): ?string; | |||||
public function setOpenGraphTitle(string $openGraphTitle): NewsInterface; | |||||
public function getOpenGraphDescription(): ?string; | |||||
public function setOpenGraphDescription(?string $openGraphDescription): NewsInterface; | |||||
public function getOpenGraphImage(): ?FileInterface; | |||||
public function setOpenGraphImage(?FileInterface $openGraphImage): NewsInterface; | |||||
public function setMetaTitle(?string $metaTitle); | |||||
public function getMetaDescription(): ?string; | |||||
public function setMetaDescription(?string $metaDescription); | |||||
public function setOldUrls($oldUrls); | |||||
public function getOldUrls(): ?array; | |||||
public function getSlug(): ?string; | |||||
public function setSlug(?string $slug); | |||||
/** | |||||
* @return float | |||||
*/ | |||||
public function getPosition(): float; | |||||
/** | |||||
* @param float $position | |||||
* @return $this | |||||
*/ | |||||
public function setPosition(float $position); | |||||
public function clearPosition(); | |||||
public function getStatus(): ?float; | |||||
public function setStatus(float $status); | |||||
public function getCreatedAt(): ?\DateTimeInterface; | |||||
public function setCreatedAt(\DateTimeInterface $createdAt); | |||||
public function getUpdatedAt(): ?\DateTimeInterface; | |||||
} | |||||
public function setUpdatedAt(\DateTimeInterface $updatedAt); | |||||
} |
namespace Lc\SovBundle\Model\Site; | namespace Lc\SovBundle\Model\Site; | ||||
use Lc\SovBundle\Model\User\UserInterface; | |||||
interface PageInterface | interface PageInterface | ||||
{ | { | ||||
public function getTitle(): ?string; | |||||
public function setTitle(string $title); | |||||
public function getDescription(): ?string; | |||||
public function setDescription(?string $description); | |||||
public function getCreatedBy(): ?UserInterface; | |||||
public function setCreatedBy(?UserInterface $createdBy); | |||||
public function getUpdatedBy(): ?UserInterface; | |||||
public function setUpdatedBy(?UserInterface $updatedBy); | |||||
public function getDevAlias(): ?string; | |||||
public function setDevAlias(?string $devAlias); | |||||
public function getMetaTitle(): ?string; | |||||
public function setMetaTitle(?string $metaTitle); | |||||
public function getMetaDescription(): ?string; | |||||
public function setMetaDescription(?string $metaDescription); | |||||
public function setOldUrls($oldUrls); | |||||
public function getOldUrls(): ?array; | |||||
public function getSlug(): ?string; | |||||
public function setSlug(?string $slug); | |||||
/** | |||||
* @return float | |||||
*/ | |||||
public function getPosition(): float; | |||||
/** | |||||
* @param float $position | |||||
* @return $this | |||||
*/ | |||||
public function setPosition(float $position); | |||||
public function clearPosition(); | |||||
public function getStatus(): ?float; | |||||
public function setStatus(float $status); | |||||
public function getCreatedAt(): ?\DateTimeInterface; | |||||
public function setCreatedAt(\DateTimeInterface $createdAt); | |||||
public function getUpdatedAt(): ?\DateTimeInterface; | |||||
} | |||||
public function setUpdatedAt(\DateTimeInterface $updatedAt); | |||||
} |
namespace Lc\SovBundle\Model\Site; | namespace Lc\SovBundle\Model\Site; | ||||
use Doctrine\Common\Collections\Collection; | |||||
use Lc\SovBundle\Model\Setting\SiteSettingInterface; | |||||
interface SiteInterface | interface SiteInterface | ||||
{ | { | ||||
public function getDevAlias(): ?string; | |||||
public function setDevAlias(?string $devAlias): SiteInterface; | |||||
/** | |||||
* @return Collection|SiteSettingInterface[] | |||||
*/ | |||||
public function getSettings(): Collection; | |||||
public function addSetting(SiteSettingInterface $setting): SiteInterface; | |||||
} | |||||
public function removeSetting(SiteSettingInterface $setting): SiteInterface; | |||||
} |
namespace Lc\SovBundle\Model\Ticket; | namespace Lc\SovBundle\Model\Ticket; | ||||
use Doctrine\Common\Collections\Collection; | |||||
use Lc\SovBundle\Model\User\UserInterface; | |||||
interface TicketInterface | interface TicketInterface | ||||
{ | { | ||||
public function getCreatedBy(): ?UserInterface; | |||||
public function setCreatedBy(?UserInterface $createdBy); | |||||
public function getUpdatedBy(): ?UserInterface; | |||||
public function setUpdatedBy(?UserInterface $updatedBy); | |||||
public function getDevAlias(): ?string; | |||||
public function setDevAlias(?string $devAlias); | |||||
public function getType(): ?string; | |||||
public function setType(string $type): TicketInterface; | |||||
public function getStatus(): ?string; | |||||
public function setStatus(string $status); | |||||
public function getSubject(): ?string; | |||||
public function setSubject(string $subject): TicketInterface; | |||||
public function getTags(): ?array; | |||||
public function setTags(?array $tags): TicketInterface; | |||||
public function getVisitorFirstname(): ?string; | |||||
public function setVisitorFirstname(?string $visitorFirstname): TicketInterface; | |||||
public function getVisitorLastname(): ?string; | |||||
public function setVisitorLastname(?string $visitorLastname): TicketInterface; | |||||
public function getVisitorEmail(): ?string; | |||||
public function setVisitorEmail(?string $visitorEmail): TicketInterface; | |||||
public function getVisitorToken(): ?string; | |||||
public function setVisitorToken(?string $visitorToken): TicketInterface; | |||||
/** | |||||
* @return Collection|TicketMessageInterface[] | |||||
*/ | |||||
public function getTicketMessages(): Collection; | |||||
public function addTicketMessage(TicketMessageInterface $ticketMessage): TicketInterface; | |||||
public function removeTicketMessage(TicketMessageInterface $ticketMessage): TicketInterface; | |||||
public function getUser(): ?UserInterface; | |||||
public function setUser(?UserInterface $user): TicketInterface; | |||||
public function getCreatedAt(): ?\DateTimeInterface; | |||||
public function setCreatedAt(\DateTimeInterface $createdAt); | |||||
public function getUpdatedAt(): ?\DateTimeInterface; | |||||
} | |||||
public function setUpdatedAt(\DateTimeInterface $updatedAt); | |||||
} |
namespace Lc\SovBundle\Model\Ticket; | namespace Lc\SovBundle\Model\Ticket; | ||||
use Lc\SovBundle\Model\User\UserInterface; | |||||
interface TicketMessageInterface | interface TicketMessageInterface | ||||
{ | { | ||||
public function getCreatedBy(): ?UserInterface; | |||||
public function setCreatedBy(?UserInterface $createdBy); | |||||
public function getUpdatedBy(): ?UserInterface; | |||||
public function setUpdatedBy(?UserInterface $updatedBy); | |||||
public function getDevAlias(): ?string; | |||||
public function setDevAlias(?string $devAlias); | |||||
public function getStatus(): ?float; | |||||
public function setStatus(float $status): TicketMessageInterface; | |||||
public function getMessage(): ?string; | |||||
public function setMessage(string $message): TicketMessageInterface; | |||||
public function getTicket(): TicketInterface; | |||||
public function setTicket(TicketInterface $ticket): TicketMessageInterface; | |||||
public function getAnswerByAdmin(): ?bool; | |||||
public function setAnswerByAdmin(?bool $answerByAdmin): TicketMessageInterface; | |||||
public function getImageFilename(): ?string; | |||||
public function setImageFilename(?string $imageFilename): TicketMessageInterface; | |||||
public function getCreatedAt(): ?\DateTimeInterface; | |||||
public function setCreatedAt(\DateTimeInterface $createdAt); | |||||
public function getUpdatedAt(): ?\DateTimeInterface; | |||||
} | |||||
public function setUpdatedAt(\DateTimeInterface $updatedAt); | |||||
} |
namespace Lc\SovBundle\Model\User; | namespace Lc\SovBundle\Model\User; | ||||
use Doctrine\Common\Collections\Collection; | |||||
interface GroupUserInterface | interface GroupUserInterface | ||||
{ | { | ||||
public function getDescription(): ?string; | |||||
public function setDescription(?string $description); | |||||
public function getCreatedBy(): ?UserInterface; | |||||
public function setCreatedBy(?UserInterface $createdBy); | |||||
public function getUpdatedBy(): ?UserInterface; | |||||
public function setUpdatedBy(?UserInterface $updatedBy); | |||||
public function getDevAlias(): ?string; | |||||
public function setDevAlias(?string $devAlias); | |||||
public function getTitle(): ?string; | |||||
public function setTitle(string $title); | |||||
public function addUser(UserInterface $user): GroupUserInterface; | |||||
/** | |||||
* @return Collection|UserInterface[] | |||||
*/ | |||||
public function getUsers(): Collection; | |||||
public function removeUser(UserInterface $user): GroupUserInterface; | |||||
public function getMetaTitle(): ?string; | |||||
public function setMetaTitle(?string $metaTitle); | |||||
public function getMetaDescription(): ?string; | |||||
public function setMetaDescription(?string $metaDescription); | |||||
public function setOldUrls($oldUrls); | |||||
public function getOldUrls(): ?array; | |||||
public function getSlug(): ?string; | |||||
public function setSlug(?string $slug); | |||||
/** | |||||
* @return float | |||||
*/ | |||||
public function getPosition(): float; | |||||
/** | |||||
* @param float $position | |||||
* @return $this | |||||
*/ | |||||
public function setPosition(float $position); | |||||
public function clearPosition(); | |||||
public function getStatus(): ?float; | |||||
public function setStatus(float $status); | |||||
public function getCreatedAt(): ?\DateTimeInterface; | |||||
public function setCreatedAt(\DateTimeInterface $createdAt); | |||||
public function getUpdatedAt(): ?\DateTimeInterface; | |||||
} | |||||
public function setUpdatedAt(\DateTimeInterface $updatedAt); | |||||
} |
namespace Lc\SovBundle\Model\User; | namespace Lc\SovBundle\Model\User; | ||||
use Doctrine\Common\Collections\Collection; | |||||
use Lc\SovBundle\Model\Ticket\TicketInterface; | |||||
interface UserInterface | interface UserInterface | ||||
{ | { | ||||
public function getDevAlias(): ?string; | |||||
public function setDevAlias(?string $devAlias): UserInterface; | |||||
public function getCreatedAt(): ?\DateTimeInterface; | |||||
public function setCreatedAt(\DateTimeInterface $createdAt): UserInterface; | |||||
public function getUpdatedAt(): ?\DateTimeInterface; | |||||
public function setUpdatedAt(\DateTimeInterface $updatedAt): UserInterface; | |||||
public function getEmail(): ?string; | |||||
public function setEmail(string $email): UserInterface; | |||||
/** | |||||
* A visual identifier that represents this user. | |||||
* | |||||
* @see UserInterface | |||||
*/ | |||||
public function getUsername(): string; | |||||
public function getGender(): ?bool; | |||||
public function setGender(?bool $gender): UserInterface; | |||||
public function getBirthdate(): ?\DateTimeInterface; | |||||
public function setBirthdate(?\DateTimeInterface $birthdate): UserInterface; | |||||
/** | |||||
* @see UserInterface | |||||
*/ | |||||
public function getRoles(): array; | |||||
public function setRoles(array $roles): UserInterface; | |||||
public function hasRole($role); | |||||
/** | |||||
* @see UserInterface | |||||
*/ | |||||
public function getPassword(): string; | |||||
public function setPassword(string $password): UserInterface; | |||||
public function generatePassword($length = 8): string; | |||||
/** | |||||
* @see UserIn | |||||
*/ | |||||
public function getSalt(); | |||||
/** | |||||
* @see UserInterface | |||||
*/ | |||||
public function eraseCredentials(); | |||||
public function getLastname(): ?string; | |||||
public function setLastname(?string $lastname): UserInterface; | |||||
public function getFirstname(): ?string; | |||||
public function setFirstname(?string $firstname): UserInterface; | |||||
public function getPhone(): ?string; | |||||
public function setPhone(?string $phone): UserInterface; | |||||
public function isVerified(): bool; | |||||
public function setIsVerified(bool $isVerified): UserInterface; | |||||
/** | |||||
* @return Collection|GroupUserInterface[] | |||||
*/ | |||||
public function getGroupUsers(): Collection; | |||||
public function addGroupUser(GroupUserInterface $groupUser): UserInterface; | |||||
public function removeGroupUser(GroupUserInterface $groupUser): UserInterface; | |||||
/** | |||||
* @return Collection|TicketInterface[] | |||||
*/ | |||||
public function getTickets(): Collection; | |||||
public function addTicket(TicketInterface $ticket): UserInterface; | |||||
public function removeTicket(TicketInterface $ticket): UserInterface; | |||||
public function getTicketTypesNotification(): ?array; | |||||
} | |||||
public function setTicketTypesNotification(?array $ticketTypesNotification): UserInterface; | |||||
} |
use Lc\SovBundle\Doctrine\Extension\TimestampableTrait; | use Lc\SovBundle\Doctrine\Extension\TimestampableTrait; | ||||
use Lc\SovBundle\Model\Ticket\TicketInterface; | use Lc\SovBundle\Model\Ticket\TicketInterface; | ||||
use Symfony\Component\Security\Core\User\UserInterface; | 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, DevAliasInterface | |||||
abstract class UserModel implements EntityInterface, UserInterface, SovUserInterface, DevAliasInterface | |||||
{ | { | ||||
use DevAliasTrait; | use DevAliasTrait; | ||||
use TimestampableTrait; | use TimestampableTrait; |
namespace Lc\SovBundle\Repository; | namespace Lc\SovBundle\Repository; | ||||
use Doctrine\Common\Collections\Collection; | |||||
use Doctrine\Common\Collections\Criteria; | |||||
use Doctrine\ORM\AbstractQuery; | |||||
use Doctrine\ORM\LazyCriteriaCollection; | |||||
use Doctrine\ORM\NativeQuery; | |||||
use Doctrine\ORM\Query; | |||||
use Doctrine\ORM\Query\ResultSetMappingBuilder; | |||||
use Doctrine\ORM\QueryBuilder; | |||||
interface AbstractRepositoryInterface | interface AbstractRepositoryInterface | ||||
{ | { | ||||
public function setDefaultLocale($locale); | |||||
} | |||||
public function getOneOrNullResult(QueryBuilder $qb, $locale = null, $hydrationMode = null); | |||||
public function getResult(QueryBuilder $qb, $locale = null, $hydrationMode = AbstractQuery::HYDRATE_OBJECT); | |||||
public function getArrayResult(QueryBuilder $qb, $locale = null); | |||||
public function getSingleResult(QueryBuilder $qb, $locale = null, $hydrationMode = null); | |||||
public function getScalarResult(QueryBuilder $qb, $locale = null); | |||||
public function getSingleScalarResult(QueryBuilder $qb, $locale = null); | |||||
/** | |||||
* Creates a new QueryBuilder instance that is prepopulated for this entity name. | |||||
* | |||||
* @param string $alias | |||||
* @param string $indexBy The index for the from. | |||||
* | |||||
* @return QueryBuilder | |||||
*/ | |||||
public function createQueryBuilder($alias, $indexBy = null); | |||||
/** | |||||
* Creates a new result set mapping builder for this entity. | |||||
* | |||||
* The column naming strategy is "INCREMENT". | |||||
* | |||||
* @param string $alias | |||||
* | |||||
* @return ResultSetMappingBuilder | |||||
*/ | |||||
public function createResultSetMappingBuilder($alias); | |||||
/** | |||||
* Creates a new Query instance based on a predefined metadata named query. | |||||
* | |||||
* @param string $queryName | |||||
* | |||||
* @return Query | |||||
* @deprecated | |||||
* | |||||
*/ | |||||
public function createNamedQuery($queryName); | |||||
/** | |||||
* Creates a native SQL query. | |||||
* | |||||
* @param string $queryName | |||||
* | |||||
* @return NativeQuery | |||||
* @deprecated | |||||
* | |||||
*/ | |||||
public function createNativeNamedQuery($queryName); | |||||
/** | |||||
* Clears the repository, causing all managed entities to become detached. | |||||
* | |||||
* @deprecated 2.8 This method is being removed from the ORM and won't have any replacement | |||||
* | |||||
* @return void | |||||
*/ | |||||
public function clear(); | |||||
/** | |||||
* Finds an entity by its primary key / identifier. | |||||
* | |||||
* @param mixed $id The identifier. | |||||
* @param int|null $lockMode One of the \Doctrine\DBAL\LockMode::* constants | |||||
* or NULL if no specific lock mode should be used | |||||
* during the search. | |||||
* @param int|null $lockVersion The lock version. | |||||
* | |||||
* @return object|null The entity instance or NULL if the entity can not be found. | |||||
* @psalm-return ?T | |||||
*/ | |||||
public function find($id, $lockMode = null, $lockVersion = null); | |||||
/** | |||||
* Finds all entities in the repository. | |||||
* | |||||
* @psalm-return list<T> The entities. | |||||
*/ | |||||
public function findAll(); | |||||
/** | |||||
* Finds entities by a set of criteria. | |||||
* | |||||
* @param int|null $limit | |||||
* @param int|null $offset | |||||
* @psalm-param array<string, mixed> $criteria | |||||
* @psalm-param array<string, string>|null $orderBy | |||||
* | |||||
* @psalm-return list<T> The objects. | |||||
*/ | |||||
public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null); | |||||
/** | |||||
* Finds a single entity by a set of criteria. | |||||
* | |||||
* @psalm-param array<string, mixed> $criteria | |||||
* @psalm-param array<string, string>|null $orderBy | |||||
* | |||||
* @return object|null The entity instance or NULL if the entity can not be found. | |||||
* @psalm-return ?T | |||||
*/ | |||||
public function findOneBy(array $criteria, ?array $orderBy = null); | |||||
/** | |||||
* Counts entities by a set of criteria. | |||||
* | |||||
* @psalm-param array<string, mixed> $criteria | |||||
* | |||||
* @return int The cardinality of the objects that match the given criteria. | |||||
* | |||||
* @todo Add this method to `ObjectRepository` interface in the next major release | |||||
*/ | |||||
public function count(array $criteria); | |||||
/** | |||||
* @return string | |||||
*/ | |||||
public function getClassName(); | |||||
/** | |||||
* Select all elements from a selectable that match the expression and | |||||
* return a new collection containing these elements. | |||||
* | |||||
* @return LazyCriteriaCollection | |||||
* @psalm-return Collection<int, T> | |||||
*/ | |||||
public function matching(Criteria $criteria); | |||||
} |
namespace Lc\SovBundle\Repository\File; | namespace Lc\SovBundle\Repository\File; | ||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; | |||||
use Doctrine\ORM\QueryBuilder; | |||||
use Lc\SovBundle\Doctrine\EntityInterface; | |||||
interface FileRepositoryQueryInterface | interface FileRepositoryQueryInterface | ||||
{ | { | ||||
public function create(); | |||||
public function call(callable $fn); | |||||
public function count(); | |||||
public function findOne(); | |||||
public function find(): array; | |||||
public function limit(int $maxResults); | |||||
public function paginate(int $page = 1, int $limit = 20); | |||||
public function getRepository(): ServiceEntityRepository; | |||||
public function getQueryBuilder(): QueryBuilder; | |||||
public function groupBy(string $field); | |||||
public function orderBy(string $field, string $sort = 'ASC'); | |||||
public function filterById(int $id); | |||||
public function andWhereEqual($field, $value); | |||||
public function filterByOldUrl(string $oldUrl); | |||||
public function resetRelationsJoin(): void; | |||||
public function filterByDevAlias(string $devAlias); | |||||
public function filterBySlug(string $slug); | |||||
public function filterIsParent(); | |||||
public function filterIsChildren(); | |||||
public function filterByParent(EntityInterface $parent = null); | |||||
public function filterIsOffline(); | |||||
public function filterIsOnline(); | |||||
public function filterIsDeleted(); | |||||
public function filterIsOnlineAndOffline(); | |||||
} | } |
{ | { | ||||
$this->query = $query; | $this->query = $query; | ||||
} | } | ||||
public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface | public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface | ||||
{ | { | ||||
return $query; | return $query; | ||||
} | } | ||||
public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface | public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface | ||||
{ | { | ||||
return $query; | return $query; | ||||
} | } | ||||
namespace Lc\SovBundle\Repository\File; | namespace Lc\SovBundle\Repository\File; | ||||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||||
interface FileStoreInterface | interface FileStoreInterface | ||||
{ | { | ||||
public function createDefaultQuery(RepositoryQueryInterface $query = null): RepositoryQueryInterface; | |||||
public function createQuery(RepositoryQueryInterface $query = null): RepositoryQueryInterface; | |||||
public function getRepositoryQuery(); | |||||
public function getOneById(int $id); | |||||
public function getOneBySlug(string $slug, bool $isOnline = true, $query = null); | |||||
public function getOneByDevAlias(string $devAlias, $query = null); | |||||
public function getOneOnlineByDevAlias(string $devAlias, $query = null); | |||||
public function getOneByOldUrl(string $oldUrl, $query = null); | |||||
public function get($query = null); | |||||
public function getAll($query = null); | |||||
public function getOnline($query = null); | |||||
public function getParent(bool $isOnline = true, $query = null); | |||||
public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
public function relationsDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
} | } |
namespace Lc\SovBundle\Repository\Newsletter; | namespace Lc\SovBundle\Repository\Newsletter; | ||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; | |||||
use Doctrine\ORM\QueryBuilder; | |||||
use Lc\SovBundle\Doctrine\EntityInterface; | |||||
use Lc\SovBundle\Repository\AbstractRepositoryQuery; | |||||
interface NewsletterRepositoryQueryInterface | interface NewsletterRepositoryQueryInterface | ||||
{ | { | ||||
public function create(); | |||||
public function call(callable $fn); | |||||
public function count(); | |||||
public function findOne(); | |||||
public function find(): array; | |||||
public function limit(int $maxResults); | |||||
public function paginate(int $page = 1, int $limit = 20); | |||||
public function getRepository(): ServiceEntityRepository; | |||||
public function getQueryBuilder(): QueryBuilder; | |||||
public function groupBy(string $field); | |||||
public function orderBy(string $field, string $sort = 'ASC'); | |||||
public function filterById(int $id); | |||||
public function andWhereEqual($field, $value); | |||||
public function filterByOldUrl(string $oldUrl); | |||||
public function resetRelationsJoin(): void; | |||||
public function filterByDevAlias(string $devAlias); | |||||
public function filterBySlug(string $slug); | |||||
public function filterIsParent(); | |||||
public function filterIsChildren(); | |||||
public function filterByParent(EntityInterface $parent = null); | |||||
public function filterIsOffline(); | |||||
public function filterIsOnline(); | |||||
public function filterIsDeleted(); | |||||
public function filterIsOnlineAndOffline(); | |||||
} | } |
{ | { | ||||
$this->query = $query; | $this->query = $query; | ||||
} | } | ||||
public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface | public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface | ||||
{ | { | ||||
return $query; | return $query; | ||||
} | } | ||||
public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface | public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface | ||||
{ | { | ||||
return $query; | return $query; | ||||
} | } | ||||
namespace Lc\SovBundle\Repository\Newsletter; | namespace Lc\SovBundle\Repository\Newsletter; | ||||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||||
interface NewsletterStoreInterface | interface NewsletterStoreInterface | ||||
{ | { | ||||
public function createDefaultQuery(RepositoryQueryInterface $query = null): RepositoryQueryInterface; | |||||
public function createQuery(RepositoryQueryInterface $query = null): RepositoryQueryInterface; | |||||
public function getRepositoryQuery(); | |||||
public function getOneById(int $id); | |||||
public function getOneBySlug(string $slug, bool $isOnline = true, $query = null); | |||||
public function getOneByDevAlias(string $devAlias, $query = null); | |||||
public function getOneOnlineByDevAlias(string $devAlias, $query = null); | |||||
public function getOneByOldUrl(string $oldUrl, $query = null); | |||||
public function get($query = null); | |||||
public function getAll($query = null); | |||||
public function getOnline($query = null); | |||||
public function getParent(bool $isOnline = true, $query = null); | |||||
public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
public function relationsDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
} | } |
namespace Lc\SovBundle\Repository\Reminder; | namespace Lc\SovBundle\Repository\Reminder; | ||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; | |||||
use Doctrine\ORM\QueryBuilder; | |||||
use Lc\SovBundle\Doctrine\EntityInterface; | |||||
use Lc\SovBundle\Model\User\UserInterface; | |||||
use Lc\SovBundle\Repository\AbstractRepositoryQuery; | |||||
interface ReminderRepositoryQueryInterface | interface ReminderRepositoryQueryInterface | ||||
{ | { | ||||
public function create(); | |||||
public function call(callable $fn); | |||||
public function count(); | |||||
public function findOne(); | |||||
public function find(): array; | |||||
public function limit(int $maxResults); | |||||
public function paginate(int $page = 1, int $limit = 20); | |||||
public function getRepository(): ServiceEntityRepository; | |||||
public function getQueryBuilder(): QueryBuilder; | |||||
public function groupBy(string $field); | |||||
public function orderBy(string $field, string $sort = 'ASC'); | |||||
public function filterById(int $id); | |||||
public function andWhereEqual($field, $value); | |||||
public function filterByOldUrl(string $oldUrl); | |||||
public function resetRelationsJoin(): void; | |||||
public function filterByDevAlias(string $devAlias); | |||||
public function filterBySlug(string $slug); | |||||
public function filterIsParent(); | |||||
public function filterIsChildren(); | |||||
public function filterByParent(EntityInterface $parent = null); | |||||
public function filterIsOffline(); | |||||
public function filterIsOnline(); | |||||
public function filterIsDeleted(); | |||||
public function filterIsOnlineAndOffline(); | |||||
public function filterByDone($done = false): ReminderRepositoryQueryInterface; | |||||
public function joinUser(): ReminderRepositoryQueryInterface; | |||||
public function filterByUser(UserInterface $user): ReminderRepositoryQueryInterface; | |||||
public function filterByCrudAction(?string $crudAction = null | |||||
): ReminderRepositoryQueryInterface; | |||||
public function filterByCrudControllerFqcn(?string $crudControllerFqcn = null | |||||
): ReminderRepositoryQueryInterface; | |||||
public function filterByEntityId(?int $entityId = null): ReminderRepositoryQueryInterface; | |||||
public function filterIsNotDone(): ReminderRepositoryQueryInterface; | |||||
public function filterLikeCrudAction(string $crudAction): ReminderRepositoryQueryInterface; | |||||
public function filterLikeCrudControllerFqcn(string $crudControllerFqcn | |||||
): ReminderRepositoryQueryInterface; | |||||
} | |||||
public function filterLikeEntityId(int $entityId): ReminderRepositoryQueryInterface; | |||||
} |
namespace Lc\SovBundle\Repository\Reminder; | namespace Lc\SovBundle\Repository\Reminder; | ||||
use Lc\SovBundle\Model\User\UserInterface; | |||||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||||
interface ReminderStoreInterface | interface ReminderStoreInterface | ||||
{ | { | ||||
public function createDefaultQuery(RepositoryQueryInterface $query = null): RepositoryQueryInterface; | |||||
public function createQuery(RepositoryQueryInterface $query = null): RepositoryQueryInterface; | |||||
public function getRepositoryQuery(); | |||||
public function getOneById(int $id); | |||||
public function getOneBySlug(string $slug, bool $isOnline = true, $query = null); | |||||
public function getOneByDevAlias(string $devAlias, $query = null); | |||||
public function getOneOnlineByDevAlias(string $devAlias, $query = null); | |||||
public function getOneByOldUrl(string $oldUrl, $query = null); | |||||
public function getAll($query = null); | |||||
public function getOnline($query = null); | |||||
public function getParent(bool $isOnline = true, $query = null); | |||||
public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
public function relationsDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
public function get($params = [], $query = null); | |||||
public function getByUser(UserInterface $user, $query = null): array; | |||||
} | |||||
public function getByEasyAdminConfigAndUser( | |||||
string $crudAction, | |||||
string $crudControllerFqcn, | |||||
UserInterface $user, | |||||
int $entityId = null, | |||||
$query = null | |||||
): array; | |||||
} |
namespace Lc\SovBundle\Repository; | namespace Lc\SovBundle\Repository; | ||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; | use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; | ||||
use Doctrine\ORM\QueryBuilder; | |||||
use Lc\SovBundle\Doctrine\EntityInterface; | use Lc\SovBundle\Doctrine\EntityInterface; | ||||
interface RepositoryQueryInterface | interface RepositoryQueryInterface | ||||
{ | { | ||||
public function create(); | public function create(); | ||||
public function call(callable $fn):self; | |||||
public function call(callable $fn); | |||||
public function count(); | public function count(); | ||||
public function find(): array; | public function find(): array; | ||||
public function limit(int $maxResults):self; | |||||
public function limit(int $maxResults); | |||||
public function paginate(int $page = 1, int $limit = 20); | public function paginate(int $page = 1, int $limit = 20); | ||||
public function getRepository(): ServiceEntityRepository; | public function getRepository(): ServiceEntityRepository; | ||||
public function orderBy(string $field, string $sort = 'ASC'):self; | |||||
public function getQueryBuilder(): QueryBuilder; | |||||
public function filterById(int $id):self; | |||||
public function groupBy(string $field); | |||||
public function filterByDevAlias(string $devAlias):self; | |||||
public function orderBy(string $field, string $sort = 'ASC'); | |||||
public function filterBySlug(string $slug):self; | |||||
public function filterById(int $id); | |||||
public function filterIsParent():self; | |||||
public function andWhereEqual($field, $value); | |||||
public function filterIsChildren():self; | |||||
public function filterByOldUrl(string $oldUrl); | |||||
public function filterByParent(EntityInterface $parent):self; | |||||
public function resetRelationsJoin(): void; | |||||
public function filterIsOffline():self; | |||||
public function filterByDevAlias(string $devAlias); | |||||
public function filterIsOnline():self; | |||||
public function filterBySlug(string $slug); | |||||
public function filterIsDeleted():self; | |||||
public function filterIsParent(); | |||||
public function filterIsOnlineAndOffline():self; | |||||
public function filterIsChildren(); | |||||
public function filterByParent(EntityInterface $parent = null); | |||||
public function filterIsOffline(); | |||||
public function filterIsOnline(); | |||||
public function filterIsDeleted(); | |||||
public function filterIsOnlineAndOffline(); | |||||
} | } |
namespace Lc\SovBundle\Repository\Setting; | namespace Lc\SovBundle\Repository\Setting; | ||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; | |||||
use Doctrine\ORM\QueryBuilder; | |||||
use Lc\SovBundle\Doctrine\EntityInterface; | |||||
use Lc\SovBundle\Repository\AbstractRepositoryQuery; | |||||
interface SiteSettingRepositoryQueryInterface | interface SiteSettingRepositoryQueryInterface | ||||
{ | { | ||||
public function create(); | |||||
public function call(callable $fn); | |||||
public function count(); | |||||
public function findOne(); | |||||
public function find(): array; | |||||
public function limit(int $maxResults); | |||||
public function paginate(int $page = 1, int $limit = 20); | |||||
public function getRepository(): ServiceEntityRepository; | |||||
public function getQueryBuilder(): QueryBuilder; | |||||
public function groupBy(string $field); | |||||
public function orderBy(string $field, string $sort = 'ASC'); | |||||
public function filterById(int $id); | |||||
public function andWhereEqual($field, $value); | |||||
public function filterByOldUrl(string $oldUrl); | |||||
public function resetRelationsJoin(): void; | |||||
public function filterByDevAlias(string $devAlias); | |||||
public function filterBySlug(string $slug); | |||||
public function filterIsParent(); | |||||
public function filterIsChildren(); | |||||
public function filterByParent(EntityInterface $parent = null); | |||||
public function filterIsOffline(); | |||||
public function filterIsOnline(); | |||||
public function filterIsDeleted(); | |||||
public function filterIsOnlineAndOffline(); | |||||
} | } |
{ | { | ||||
$this->query = $query; | $this->query = $query; | ||||
} | } | ||||
public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface | public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface | ||||
{ | { | ||||
return $query; | return $query; | ||||
} | } | ||||
public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface | public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface | ||||
{ | { | ||||
return $query; | return $query; | ||||
} | } | ||||
namespace Lc\SovBundle\Repository\Setting; | namespace Lc\SovBundle\Repository\Setting; | ||||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||||
interface SiteSettingStoreInterface | interface SiteSettingStoreInterface | ||||
{ | { | ||||
public function createDefaultQuery(RepositoryQueryInterface $query = null): RepositoryQueryInterface; | |||||
public function createQuery(RepositoryQueryInterface $query = null): RepositoryQueryInterface; | |||||
public function getRepositoryQuery(); | |||||
public function getOneById(int $id); | |||||
public function getOneBySlug(string $slug, bool $isOnline = true, $query = null); | |||||
public function getOneByDevAlias(string $devAlias, $query = null); | |||||
public function getOneOnlineByDevAlias(string $devAlias, $query = null); | |||||
public function getOneByOldUrl(string $oldUrl, $query = null); | |||||
public function get($query = null); | |||||
public function getAll($query = null); | |||||
public function getOnline($query = null); | |||||
public function getParent(bool $isOnline = true, $query = null); | |||||
public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
public function relationsDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
} | } |
namespace Lc\SovBundle\Repository\Site; | namespace Lc\SovBundle\Repository\Site; | ||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; | |||||
use Doctrine\ORM\QueryBuilder; | |||||
use Lc\SovBundle\Doctrine\EntityInterface; | |||||
use Lc\SovBundle\Repository\AbstractRepositoryQuery; | |||||
interface NewsRepositoryQueryInterface | interface NewsRepositoryQueryInterface | ||||
{ | { | ||||
public function create(); | |||||
public function call(callable $fn); | |||||
public function count(); | |||||
public function findOne(); | |||||
public function find(): array; | |||||
public function limit(int $maxResults); | |||||
public function paginate(int $page = 1, int $limit = 20); | |||||
public function getRepository(): ServiceEntityRepository; | |||||
public function getQueryBuilder(): QueryBuilder; | |||||
public function groupBy(string $field); | |||||
public function orderBy(string $field, string $sort = 'ASC'); | |||||
public function filterById(int $id); | |||||
public function andWhereEqual($field, $value); | |||||
public function filterByOldUrl(string $oldUrl); | |||||
public function resetRelationsJoin(): void; | |||||
public function filterByDevAlias(string $devAlias); | |||||
public function filterBySlug(string $slug); | |||||
public function filterIsParent(); | |||||
public function filterIsChildren(); | |||||
public function filterByParent(EntityInterface $parent = null); | |||||
public function filterIsOffline(); | |||||
public function filterIsOnline(); | |||||
public function filterIsDeleted(); | |||||
public function filterIsOnlineAndOffline(); | |||||
} | } |
namespace Lc\SovBundle\Repository\Site; | namespace Lc\SovBundle\Repository\Site; | ||||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||||
interface NewsStoreInterface | interface NewsStoreInterface | ||||
{ | { | ||||
public function createDefaultQuery(RepositoryQueryInterface $query = null): RepositoryQueryInterface; | |||||
public function createQuery(RepositoryQueryInterface $query = null): RepositoryQueryInterface; | |||||
public function getRepositoryQuery(); | |||||
public function getOneById(int $id); | |||||
public function getOneBySlug(string $slug, bool $isOnline = true, $query = null); | |||||
public function getOneByDevAlias(string $devAlias, $query = null); | |||||
public function getOneOnlineByDevAlias(string $devAlias, $query = null); | |||||
public function getOneByOldUrl(string $oldUrl, $query = null); | |||||
public function get($query = null); | |||||
public function getAll($query = null); | |||||
public function getOnline($query = null); | |||||
public function getParent(bool $isOnline = true, $query = null); | |||||
public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
public function relationsDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
public function getLatests(int $maxResults = 0, $query = null): array; | |||||
} | } |
namespace Lc\SovBundle\Repository\Site; | namespace Lc\SovBundle\Repository\Site; | ||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; | |||||
use Doctrine\ORM\QueryBuilder; | |||||
use Lc\SovBundle\Doctrine\EntityInterface; | |||||
use Lc\SovBundle\Repository\AbstractRepositoryQuery; | |||||
interface PageRepositoryQueryInterface | interface PageRepositoryQueryInterface | ||||
{ | { | ||||
public function create(); | |||||
public function call(callable $fn); | |||||
public function count(); | |||||
public function findOne(); | |||||
public function find(): array; | |||||
public function limit(int $maxResults); | |||||
public function paginate(int $page = 1, int $limit = 20); | |||||
public function getRepository(): ServiceEntityRepository; | |||||
public function getQueryBuilder(): QueryBuilder; | |||||
public function groupBy(string $field); | |||||
public function orderBy(string $field, string $sort = 'ASC'); | |||||
public function filterById(int $id); | |||||
public function andWhereEqual($field, $value); | |||||
public function filterByOldUrl(string $oldUrl); | |||||
public function resetRelationsJoin(): void; | |||||
public function filterByDevAlias(string $devAlias); | |||||
public function filterBySlug(string $slug); | |||||
public function filterIsParent(); | |||||
public function filterIsChildren(); | |||||
public function filterByParent(EntityInterface $parent = null); | |||||
public function filterIsOffline(); | |||||
public function filterIsOnline(); | |||||
public function filterIsDeleted(); | |||||
public function filterIsOnlineAndOffline(); | |||||
} | } |
namespace Lc\SovBundle\Repository\Site; | namespace Lc\SovBundle\Repository\Site; | ||||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||||
interface PageStoreInterface | interface PageStoreInterface | ||||
{ | { | ||||
public function createDefaultQuery(RepositoryQueryInterface $query = null): RepositoryQueryInterface; | |||||
public function createQuery(RepositoryQueryInterface $query = null): RepositoryQueryInterface; | |||||
public function getRepositoryQuery(); | |||||
public function getOneById(int $id); | |||||
public function getOneBySlug(string $slug, bool $isOnline = true, $query = null); | |||||
public function getOneByDevAlias(string $devAlias, $query = null); | |||||
public function getOneOnlineByDevAlias(string $devAlias, $query = null); | |||||
public function getOneByOldUrl(string $oldUrl, $query = null); | |||||
public function get($query = null); | |||||
public function getAll($query = null); | |||||
public function getOnline($query = null); | |||||
public function getParent(bool $isOnline = true, $query = null); | |||||
public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
public function relationsDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
} | } |
namespace Lc\SovBundle\Repository\Site; | namespace Lc\SovBundle\Repository\Site; | ||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; | |||||
use Doctrine\ORM\QueryBuilder; | |||||
use Lc\SovBundle\Doctrine\EntityInterface; | |||||
use Lc\SovBundle\Repository\AbstractRepositoryQuery; | |||||
interface SiteRepositoryQueryInterface | interface SiteRepositoryQueryInterface | ||||
{ | { | ||||
public function create(); | |||||
public function call(callable $fn); | |||||
public function count(); | |||||
public function findOne(); | |||||
public function find(): array; | |||||
public function limit(int $maxResults); | |||||
public function paginate(int $page = 1, int $limit = 20); | |||||
public function getRepository(): ServiceEntityRepository; | |||||
public function getQueryBuilder(): QueryBuilder; | |||||
public function groupBy(string $field); | |||||
public function orderBy(string $field, string $sort = 'ASC'); | |||||
public function filterById(int $id); | |||||
public function andWhereEqual($field, $value); | |||||
public function filterByOldUrl(string $oldUrl); | |||||
public function resetRelationsJoin(): void; | |||||
public function filterByDevAlias(string $devAlias); | |||||
public function filterBySlug(string $slug); | |||||
public function filterIsParent(); | |||||
public function filterIsChildren(); | |||||
public function filterByParent(EntityInterface $parent = null); | |||||
public function filterIsOffline(); | |||||
public function filterIsOnline(); | |||||
public function filterIsDeleted(); | |||||
public function filterIsOnlineAndOffline(); | |||||
} | } |
{ | { | ||||
$this->query = $query; | $this->query = $query; | ||||
} | } | ||||
public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface | public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface | ||||
{ | { | ||||
return $query; | return $query; | ||||
} | } | ||||
public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface | public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface | ||||
{ | { | ||||
return $query; | return $query; | ||||
} | } | ||||
namespace Lc\SovBundle\Repository\Site; | namespace Lc\SovBundle\Repository\Site; | ||||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||||
interface SiteStoreInterface | interface SiteStoreInterface | ||||
{ | { | ||||
public function createDefaultQuery(RepositoryQueryInterface $query = null): RepositoryQueryInterface; | |||||
public function createQuery(RepositoryQueryInterface $query = null): RepositoryQueryInterface; | |||||
public function getRepositoryQuery(); | |||||
public function getOneById(int $id); | |||||
public function getOneBySlug(string $slug, bool $isOnline = true, $query = null); | |||||
public function getOneByDevAlias(string $devAlias, $query = null); | |||||
public function getOneOnlineByDevAlias(string $devAlias, $query = null); | |||||
public function getOneByOldUrl(string $oldUrl, $query = null); | |||||
public function get($query = null); | |||||
public function getAll($query = null); | |||||
public function getOnline($query = null); | |||||
public function getParent(bool $isOnline = true, $query = null); | |||||
public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
public function relationsDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
public function getOneDefault(); | |||||
} | } |
interface StoreInterface | interface StoreInterface | ||||
{ | { | ||||
public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
public function relationsDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
public function createDefaultQuery(RepositoryQueryInterface $query = null): RepositoryQueryInterface; | public function createDefaultQuery(RepositoryQueryInterface $query = null): RepositoryQueryInterface; | ||||
public function createQuery(RepositoryQueryInterface $query = null): RepositoryQueryInterface; | public function createQuery(RepositoryQueryInterface $query = null): RepositoryQueryInterface; | ||||
public function getOneByDevAlias(string $devAlias, $query = null); | public function getOneByDevAlias(string $devAlias, $query = null); | ||||
public function getOneOnlineByDevAlias(string $devAlias, $query = null); | |||||
public function getOneByOldUrl(string $oldUrl, $query = null); | |||||
public function get($query = null); | public function get($query = null); | ||||
public function getAll($query = null); | |||||
public function getOnline($query = null); | public function getOnline($query = null); | ||||
public function getParent(bool $isOnline = true, $query = null); | public function getParent(bool $isOnline = true, $query = null); | ||||
public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
public function relationsDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
} | } |
namespace Lc\SovBundle\Repository\Ticket; | namespace Lc\SovBundle\Repository\Ticket; | ||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; | |||||
use Doctrine\ORM\QueryBuilder; | |||||
use Lc\SovBundle\Doctrine\EntityInterface; | |||||
use Lc\SovBundle\Model\Ticket\TicketInterface; | |||||
use Lc\SovBundle\Repository\AbstractRepositoryQuery; | |||||
interface TicketMessageRepositoryQueryInterface | interface TicketMessageRepositoryQueryInterface | ||||
{ | { | ||||
public function create(); | |||||
public function call(callable $fn); | |||||
public function count(); | |||||
public function findOne(); | |||||
public function find(): array; | |||||
public function limit(int $maxResults); | |||||
public function paginate(int $page = 1, int $limit = 20); | |||||
public function getRepository(): ServiceEntityRepository; | |||||
public function getQueryBuilder(): QueryBuilder; | |||||
public function groupBy(string $field); | |||||
public function orderBy(string $field, string $sort = 'ASC'); | |||||
public function filterById(int $id); | |||||
public function andWhereEqual($field, $value); | |||||
public function filterByOldUrl(string $oldUrl); | |||||
public function resetRelationsJoin(): void; | |||||
public function filterByDevAlias(string $devAlias); | |||||
public function filterBySlug(string $slug); | |||||
public function filterIsParent(); | |||||
public function filterIsChildren(); | |||||
public function filterByParent(EntityInterface $parent = null); | |||||
public function filterIsOffline(); | |||||
public function filterIsOnline(); | |||||
public function filterIsDeleted(); | |||||
public function filterIsOnlineAndOffline(); | |||||
public function filterByTicket(TicketInterface $ticket); | |||||
} | } |
{ | { | ||||
$this->query = $query; | $this->query = $query; | ||||
} | } | ||||
public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface | public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface | ||||
{ | { | ||||
$query->orderBy('createdAt', 'ASC'); | $query->orderBy('createdAt', 'ASC'); | ||||
public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface | public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface | ||||
{ | { | ||||
return $query; | return $query; | ||||
} | } | ||||
namespace Lc\SovBundle\Repository\Ticket; | namespace Lc\SovBundle\Repository\Ticket; | ||||
use Lc\SovBundle\Model\Ticket\TicketInterface; | |||||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||||
interface TicketMessageStoreInterface | interface TicketMessageStoreInterface | ||||
{ | { | ||||
public function createDefaultQuery(RepositoryQueryInterface $query = null): RepositoryQueryInterface; | |||||
public function createQuery(RepositoryQueryInterface $query = null): RepositoryQueryInterface; | |||||
public function getRepositoryQuery(); | |||||
public function getOneById(int $id); | |||||
public function getOneBySlug(string $slug, bool $isOnline = true, $query = null); | |||||
public function getOneByDevAlias(string $devAlias, $query = null); | |||||
public function getOneOnlineByDevAlias(string $devAlias, $query = null); | |||||
public function getOneByOldUrl(string $oldUrl, $query = null); | |||||
public function get($query = null); | |||||
public function getAll($query = null); | |||||
public function getOnline($query = null); | |||||
public function getParent(bool $isOnline = true, $query = null); | |||||
public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
public function relationsDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
public function getByTicket(TicketInterface $ticket, $query = null); | |||||
} | } |
namespace Lc\SovBundle\Repository\Ticket; | namespace Lc\SovBundle\Repository\Ticket; | ||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; | |||||
use Doctrine\ORM\QueryBuilder; | |||||
use Lc\SovBundle\Doctrine\EntityInterface; | |||||
use Lc\SovBundle\Model\User\UserInterface; | |||||
use Lc\SovBundle\Repository\AbstractRepositoryQuery; | |||||
interface TicketRepositoryQueryInterface | interface TicketRepositoryQueryInterface | ||||
{ | { | ||||
public function create(); | |||||
public function call(callable $fn); | |||||
public function count(); | |||||
public function findOne(); | |||||
public function find(): array; | |||||
public function limit(int $maxResults); | |||||
public function paginate(int $page = 1, int $limit = 20); | |||||
public function getRepository(): ServiceEntityRepository; | |||||
public function getQueryBuilder(): QueryBuilder; | |||||
public function groupBy(string $field); | |||||
public function orderBy(string $field, string $sort = 'ASC'); | |||||
public function filterById(int $id); | |||||
public function andWhereEqual($field, $value); | |||||
public function filterByOldUrl(string $oldUrl); | |||||
public function resetRelationsJoin(): void; | |||||
public function filterByDevAlias(string $devAlias); | |||||
public function filterBySlug(string $slug); | |||||
public function filterIsParent(); | |||||
public function filterIsChildren(); | |||||
public function filterByParent(EntityInterface $parent = null); | |||||
public function filterIsOffline(); | |||||
public function filterIsOnline(); | |||||
public function filterIsDeleted(); | |||||
public function filterIsOnlineAndOffline(); | |||||
public function filterByUser(UserInterface $user): TicketRepositoryQueryInterface; | |||||
public function joinUser(): TicketRepositoryQueryInterface; | |||||
public function filterByStatus($statusArray): TicketRepositoryQueryInterface; | |||||
public function filterByFirstname(string $firstname); | |||||
public function filterByLastname(string $lastname); | |||||
public function filterByEmail(string $email); | |||||
public function selectCount(): TicketRepositoryQueryInterface; | |||||
public function filterByVisitorToken(string $visitorToken): TicketRepositoryQueryInterface; | |||||
} | } |
namespace Lc\SovBundle\Repository\Ticket; | namespace Lc\SovBundle\Repository\Ticket; | ||||
use Lc\SovBundle\Model\User\UserInterface; | |||||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||||
interface TicketStoreInterface | interface TicketStoreInterface | ||||
{ | { | ||||
public function createDefaultQuery(RepositoryQueryInterface $query = null): RepositoryQueryInterface; | |||||
public function createQuery(RepositoryQueryInterface $query = null): RepositoryQueryInterface; | |||||
public function getRepositoryQuery(); | |||||
public function getOneById(int $id); | |||||
public function getOneBySlug(string $slug, bool $isOnline = true, $query = null); | |||||
public function getOneByDevAlias(string $devAlias, $query = null); | |||||
public function getOneOnlineByDevAlias(string $devAlias, $query = null); | |||||
public function getOneByOldUrl(string $oldUrl, $query = null); | |||||
public function get($query = null); | |||||
public function getAll($query = null); | |||||
public function getOnline($query = null); | |||||
public function getParent(bool $isOnline = true, $query = null); | |||||
public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
public function relationsDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
public function getByUser(UserInterface $user, $query = null): array; | |||||
public function getOpen(int $limit = 0, $query = null): array; | |||||
public function countOpen($query = null): string; | |||||
public function getOneByIdAndVisitorToken(int $id, string $token, $query = null); | |||||
} | } |
namespace Lc\SovBundle\Repository\User; | namespace Lc\SovBundle\Repository\User; | ||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; | |||||
use Doctrine\ORM\QueryBuilder; | |||||
use Lc\SovBundle\Doctrine\EntityInterface; | |||||
interface GroupUserRepositoryQueryInterface | interface GroupUserRepositoryQueryInterface | ||||
{ | { | ||||
public function create(); | |||||
public function call(callable $fn); | |||||
public function count(); | |||||
public function findOne(); | |||||
public function find(): array; | |||||
public function limit(int $maxResults); | |||||
public function paginate(int $page = 1, int $limit = 20); | |||||
public function getRepository(): ServiceEntityRepository; | |||||
public function getQueryBuilder(): QueryBuilder; | |||||
public function groupBy(string $field); | |||||
public function orderBy(string $field, string $sort = 'ASC'); | |||||
public function filterById(int $id); | |||||
public function andWhereEqual($field, $value); | |||||
public function filterByOldUrl(string $oldUrl); | |||||
public function resetRelationsJoin(): void; | |||||
public function filterByDevAlias(string $devAlias); | |||||
public function filterBySlug(string $slug); | |||||
public function filterIsParent(); | |||||
public function filterIsChildren(); | |||||
public function filterByParent(EntityInterface $parent = null); | |||||
public function filterIsOffline(); | |||||
public function filterIsOnline(); | |||||
public function filterIsDeleted(); | |||||
public function filterIsOnlineAndOffline(); | |||||
public function joinUsers(): GroupUserRepositoryQueryInterface; | |||||
} | } |
namespace Lc\SovBundle\Repository\User; | namespace Lc\SovBundle\Repository\User; | ||||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||||
interface GroupUserStoreInterface | interface GroupUserStoreInterface | ||||
{ | { | ||||
public function createDefaultQuery(RepositoryQueryInterface $query = null): RepositoryQueryInterface; | |||||
public function createQuery(RepositoryQueryInterface $query = null): RepositoryQueryInterface; | |||||
public function getRepositoryQuery(); | |||||
public function getOneById(int $id); | |||||
public function getOneBySlug(string $slug, bool $isOnline = true, $query = null); | |||||
public function getOneByDevAlias(string $devAlias, $query = null); | |||||
public function getOneOnlineByDevAlias(string $devAlias, $query = null); | |||||
public function getOneByOldUrl(string $oldUrl, $query = null); | |||||
public function get($query = null); | |||||
public function getAll($query = null); | |||||
public function getOnline($query = null); | |||||
public function getParent(bool $isOnline = true, $query = null); | |||||
public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
public function relationsDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
} | } |
if (!$this->isJoinGroupUsers) { | if (!$this->isJoinGroupUsers) { | ||||
$this->isJoinGroupUsers = true; | $this->isJoinGroupUsers = true; | ||||
$this->innerJoin('.groupUsers', 'groupUsers'); | |||||
$this->leftJoin('.groupUsers', 'groupUsers'); | |||||
if($addSelect){ | if($addSelect){ | ||||
$this->addSelect('groupUsers'); | $this->addSelect('groupUsers'); | ||||
} | } |
namespace Lc\SovBundle\Repository\User; | namespace Lc\SovBundle\Repository\User; | ||||
use App\Entity\Newsletter\Newsletter; | |||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; | |||||
use Doctrine\ORM\QueryBuilder; | |||||
use Lc\SovBundle\Doctrine\EntityInterface; | |||||
use Lc\SovBundle\Repository\AbstractRepositoryQuery; | |||||
interface UserRepositoryQueryInterface | interface UserRepositoryQueryInterface | ||||
{ | { | ||||
public function create(); | |||||
public function call(callable $fn); | |||||
public function count(); | |||||
public function findOne(); | |||||
public function find(): array; | |||||
public function limit(int $maxResults); | |||||
public function paginate(int $page = 1, int $limit = 20); | |||||
public function getRepository(): ServiceEntityRepository; | |||||
public function getQueryBuilder(): QueryBuilder; | |||||
public function groupBy(string $field); | |||||
public function orderBy(string $field, string $sort = 'ASC'); | |||||
public function filterById(int $id); | |||||
public function andWhereEqual($field, $value); | |||||
public function filterByOldUrl(string $oldUrl); | |||||
public function resetRelationsJoin(): void; | |||||
public function filterByDevAlias(string $devAlias); | |||||
public function filterBySlug(string $slug); | |||||
public function filterIsParent(); | |||||
public function filterIsChildren(); | |||||
public function filterByParent(EntityInterface $parent = null); | |||||
public function filterIsOffline(); | |||||
public function filterIsOnline(); | |||||
public function filterIsDeleted(); | |||||
public function filterIsOnlineAndOffline(); | |||||
public function joinGroupUsers($addSelect = true): UserRepositoryQueryInterface; | |||||
public function filterByNewsletter(Newsletter $newsletter): UserRepositoryQueryInterface; | |||||
public function filterByRole(string $role): UserRepositoryQueryInterface; | |||||
public function filterByTicketTypeNotification(string $ticketType): UserRepositoryQueryInterface; | |||||
public function filterByEmail(string $email): UserRepositoryQueryInterface; | |||||
} | } |
namespace Lc\SovBundle\Repository\User; | namespace Lc\SovBundle\Repository\User; | ||||
use App\Entity\Newsletter\Newsletter; | |||||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||||
interface UserStoreInterface | interface UserStoreInterface | ||||
{ | { | ||||
public function createDefaultQuery(RepositoryQueryInterface $query = null): RepositoryQueryInterface; | |||||
public function createQuery(RepositoryQueryInterface $query = null): RepositoryQueryInterface; | |||||
public function getRepositoryQuery(); | |||||
public function getOneById(int $id); | |||||
public function getOneBySlug(string $slug, bool $isOnline = true, $query = null); | |||||
public function getOneByDevAlias(string $devAlias, $query = null); | |||||
public function getOneOnlineByDevAlias(string $devAlias, $query = null); | |||||
public function getOneByOldUrl(string $oldUrl, $query = null); | |||||
public function get($query = null); | |||||
public function getAll($query = null); | |||||
public function getOnline($query = null); | |||||
public function getParent(bool $isOnline = true, $query = null); | |||||
public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
public function relationsDefault(RepositoryQueryInterface $query): RepositoryQueryInterface; | |||||
public function getByNewsletter(Newsletter $newsletter, $query = null): array; | |||||
public function getByRole(string $role, $query = null): array; | |||||
public function getByTicketTypesNotification(string $ticketType, $query = null): array; | |||||
public function getOneByEmail(string $email, $query = null); | |||||
} | } |
index: '%label_plurial%' | index: '%label_plurial%' | ||||
sort: Ordonner "%label_plurial%" | sort: Ordonner "%label_plurial%" | ||||
new: Ajouter "%label%" | new: Ajouter "%label%" | ||||
edit: Modifier "%label%" (#%id%) | |||||
edit: 'Modifier "%label%" (#%id%)' | |||||
editWithTitle: 'Modifier "%label%" : %title% (#%id%)' | |||||
detail: Voir "%label%" (#%id%) | detail: Voir "%label%" (#%id%) | ||||
un_titre: Un titre | un_titre: Un titre | ||||
account: | account: |
{% set body_id = 'ea-edit-' ~ translation_entity_name ~ '-' ~ entity.primaryKeyValue %} | {% set body_id = 'ea-edit-' ~ translation_entity_name ~ '-' ~ entity.primaryKeyValue %} | ||||
{% set body_class = 'ea-edit ea-edit-' ~ translation_entity_name %} | {% set body_class = 'ea-edit ea-edit-' ~ translation_entity_name %} | ||||
{% set content_title = 'edit'|sov_trans_admin_title(translation_entity_name, {id: ea.getEntity().getInstance().getId()}) %} | |||||
{% if attribute(ea.getEntity().getInstance(), 'getTitle') is defined %} | |||||
{% set content_title = 'editWithTitle'|sov_trans_admin_title(translation_entity_name, {id: ea.getEntity().getInstance().getId(), title: ea.getEntity().getInstance().getTitle()}) %} | |||||
{% else %} | |||||
{% set content_title = 'edit'|sov_trans_admin_title(translation_entity_name, {id: ea.getEntity().getInstance().getId()}) %} | |||||
{% endif %} | |||||
{% endif %} | {% endif %} | ||||
$paramsTranslation['%id%'] = $params['id']; | $paramsTranslation['%id%'] = $params['id']; | ||||
} | } | ||||
if (isset($params['title'])) { | |||||
$paramsTranslation['%title%'] = $params['title']; | |||||
} | |||||
return $this->trans( | return $this->trans( | ||||
'title.' . $pageName, | 'title.' . $pageName, | ||||
$paramsTranslation | $paramsTranslation |