@@ -2,6 +2,7 @@ | |||
namespace Lc\SovBundle\Container\Newsletter; | |||
use App\Entity\Newsletter\Newsletter; | |||
use Lc\SovBundle\Definition\Field\Newsletter\NewsletterFieldDefinition; | |||
use Lc\SovBundle\Factory\Newsletter\NewsletterFactory; | |||
use Lc\SovBundle\Repository\Newsletter\NewsletterRepositoryQuery; | |||
@@ -26,6 +27,12 @@ class NewsletterContainer | |||
$this->fieldDefinition = $fieldDefinition; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return Newsletter::class; | |||
} | |||
public function getFactory(): NewsletterFactory | |||
{ | |||
return $this->factory; |
@@ -2,6 +2,7 @@ | |||
namespace Lc\SovBundle\Container\Reminder; | |||
use App\Entity\Reminder\Reminder; | |||
use Lc\SovBundle\Factory\Reminder\ReminderFactory; | |||
use Lc\SovBundle\Repository\Reminder\ReminderRepositoryQuery; | |||
use Lc\SovBundle\Repository\Reminder\ReminderStore; | |||
@@ -22,6 +23,11 @@ class ReminderContainer | |||
$this->store = $store; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return Reminder::class; | |||
} | |||
public function getFactory(): ReminderFactory | |||
{ | |||
return $this->factory; |
@@ -2,6 +2,7 @@ | |||
namespace Lc\SovBundle\Container\Setting; | |||
use App\Entity\Setting\SiteSetting; | |||
use Lc\SovBundle\Definition\SiteSettingDefinition; | |||
use Lc\SovBundle\Factory\Setting\SiteSettingFactory; | |||
use Lc\SovBundle\Repository\Setting\SiteSettingRepositoryQuery; | |||
@@ -30,6 +31,12 @@ class SiteSettingContainer | |||
$this->settingSolver = $settingSolver; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return SiteSetting::class; | |||
} | |||
public function getFactory(): SiteSettingFactory | |||
{ | |||
return $this->factory; |
@@ -2,6 +2,7 @@ | |||
namespace Lc\SovBundle\Container\Site; | |||
use App\Entity\Site\News; | |||
use Lc\SovBundle\Definition\Field\Site\NewsFieldDefinition; | |||
use Lc\SovBundle\Factory\Site\NewsFactory; | |||
use Lc\SovBundle\Repository\Site\NewsRepositoryQuery; | |||
@@ -26,6 +27,11 @@ class NewsContainer | |||
$this->fieldDefinition = $fieldDefinition; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return News::class; | |||
} | |||
public function getFactory(): NewsFactory | |||
{ | |||
return $this->factory; |
@@ -2,6 +2,7 @@ | |||
namespace Lc\SovBundle\Container\Site; | |||
use App\Entity\Site\Page; | |||
use Lc\SovBundle\Definition\Field\Site\PageFieldDefinition; | |||
use Lc\SovBundle\Factory\Site\PageFactory; | |||
use Lc\SovBundle\Repository\Site\PageRepositoryQuery; | |||
@@ -26,6 +27,11 @@ class PageContainer | |||
$this->fieldDefinition = $fieldDefinition; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return Page::class; | |||
} | |||
public function getFactory(): PageFactory | |||
{ | |||
return $this->factory; |
@@ -2,6 +2,7 @@ | |||
namespace Lc\SovBundle\Container\Site; | |||
use App\Entity\Site\Site; | |||
use Lc\SovBundle\Factory\Site\SiteFactory; | |||
use Lc\SovBundle\Repository\Site\SiteRepositoryQuery; | |||
use Lc\SovBundle\Repository\Site\SiteStore; | |||
@@ -22,6 +23,10 @@ class SiteContainer | |||
$this->store = $store; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return Site::class; | |||
} | |||
public function getFactory(): SiteFactory | |||
{ | |||
return $this->factory; |
@@ -2,6 +2,7 @@ | |||
namespace Lc\SovBundle\Container\Ticket; | |||
use App\Entity\Ticket\Ticket; | |||
use Lc\SovBundle\Builder\Ticket\TicketBuilder; | |||
use Lc\SovBundle\Definition\Field\Ticket\TicketFieldDefinition; | |||
use Lc\SovBundle\Factory\Ticket\TicketFactory; | |||
@@ -34,6 +35,12 @@ class TicketContainer | |||
$this->fieldDefinition = $fieldDefinition; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return Ticket::class; | |||
} | |||
public function getFactory(): TicketFactory | |||
{ | |||
return $this->factory; |
@@ -2,6 +2,7 @@ | |||
namespace Lc\SovBundle\Container\Ticket; | |||
use App\Entity\Ticket\TicketMessage; | |||
use Lc\SovBundle\Builder\Ticket\TicketMessageBuilder; | |||
use Lc\SovBundle\Factory\Ticket\TicketMessageFactory; | |||
use Lc\SovBundle\Repository\Ticket\TicketMessageRepositoryQuery; | |||
@@ -26,6 +27,10 @@ class TicketMessageContainer | |||
$this->builder = $builder; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return TicketMessage::class; | |||
} | |||
public function getFactory(): TicketMessageFactory | |||
{ | |||
return $this->factory; |
@@ -2,6 +2,7 @@ | |||
namespace Lc\SovBundle\Container\User; | |||
use App\Entity\User\GroupUser; | |||
use Lc\SovBundle\Factory\User\GroupUserFactory; | |||
use Lc\SovBundle\Repository\User\GroupUserRepositoryQuery; | |||
use Lc\SovBundle\Repository\User\GroupUserStore; | |||
@@ -22,6 +23,10 @@ class GroupUserContainer | |||
$this->store = $store; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return GroupUser::class; | |||
} | |||
public function getFactory(): GroupUserFactory | |||
{ | |||
return $this->factory; |
@@ -2,6 +2,7 @@ | |||
namespace Lc\SovBundle\Container\User; | |||
use App\Entity\User\User; | |||
use Lc\SovBundle\Builder\User\UserBuilder; | |||
use Lc\SovBundle\Definition\Field\User\UserFieldDefinition; | |||
use Lc\SovBundle\Definition\RolesDefinitionInterface; | |||
@@ -37,6 +38,10 @@ class UserContainer | |||
$this->fieldDefinition = $fieldDefinition; | |||
$this->rolesDefinition = $rolesDefinition; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return User::class; | |||
} | |||
public function getFactory(): UserFactory | |||
{ |
@@ -100,7 +100,7 @@ abstract class UserAdminController extends AbstractAdminController | |||
$entityInstance = $event->getEntityInstance(); | |||
ApplicationDefinition::getSubscribedContainerServices(); | |||
ApplicationDefinition::getSubscribedContainerServices(); | |||
$metas = $this->getEntityManager()->getMetadataFactory()->getAllMetadata(); |
@@ -2,7 +2,6 @@ | |||
namespace Lc\SovBundle\Factory\File; | |||
use App\Entity\File\File; | |||
use Lc\SovBundle\Container\File\FileContainer; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
use Lc\SovBundle\Model\File\FileInterface; |
@@ -2,8 +2,7 @@ | |||
namespace Lc\SovBundle\Factory\Newsletter; | |||
use App\Entity\Newsletter\Newsletter; | |||
use Lc\SovBundle\Definition\ApplicationDefinition; | |||
use Lc\SovBundle\Container\Newsletter\NewsletterContainer; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
use Lc\SovBundle\Model\Newsletter\NewsletterInterface; | |||
@@ -11,7 +10,8 @@ class NewsletterFactory extends AbstractFactory | |||
{ | |||
public function create(): NewsletterInterface | |||
{ | |||
$newsletter = new Newsletter(); | |||
$class = NewsletterContainer::getEntityFqcn(); | |||
$newsletter = new $class; | |||
return $newsletter; | |||
} |
@@ -2,7 +2,7 @@ | |||
namespace Lc\SovBundle\Factory\Reminder; | |||
use App\Entity\Reminder\Reminder; | |||
use Lc\SovBundle\Container\Reminder\ReminderContainer; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
use Lc\SovBundle\Model\Reminder\ReminderInterface; | |||
@@ -13,8 +13,8 @@ class ReminderFactory extends AbstractFactory implements ReminderFactoryInterfac | |||
string $crudControllerFqcn = null, | |||
int $entityId = null | |||
): ReminderInterface { | |||
$reminder = new Reminder(); | |||
$class = ReminderContainer::getEntityFqcn(); | |||
$reminder = new $class; | |||
$reminder->setCrudAction($crudAction); | |||
$reminder->setCrudControllerFqcn($crudControllerFqcn); | |||
$reminder->setEntityId($entityId); |
@@ -2,7 +2,7 @@ | |||
namespace Lc\SovBundle\Factory\Setting; | |||
use App\Entity\Setting\SiteSetting; | |||
use Lc\SovBundle\Container\Setting\SiteSettingContainer; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
use Lc\SovBundle\Model\File\FileInterface; | |||
use Lc\SovBundle\Model\Setting\SiteSettingInterface; | |||
@@ -12,7 +12,8 @@ class SiteSettingFactory extends AbstractFactory implements SiteSettingFactoryIn | |||
{ | |||
public function create(SiteInterface $site, string $name, string $text = null, \DateTime $date = null, FileInterface $file = null): SiteSettingInterface | |||
{ | |||
$siteSetting = new SiteSetting(); | |||
$class = SiteSettingContainer::getEntityFqcn(); | |||
$siteSetting = new $class; | |||
$siteSetting->setSite($site); | |||
$siteSetting->setName($name); |
@@ -2,7 +2,7 @@ | |||
namespace Lc\SovBundle\Factory\Site; | |||
use App\Entity\Site\News; | |||
use Lc\SovBundle\Container\Site\NewsContainer; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
use Lc\SovBundle\Model\Site\NewsInterface; | |||
@@ -10,8 +10,8 @@ class NewsFactory extends AbstractFactory implements NewsFactoryInterface | |||
{ | |||
public function create(): NewsInterface | |||
{ | |||
$news = new News(); | |||
$class = NewsContainer::getEntityFqcn(); | |||
$news = new $class; | |||
$news->setStatus(1); | |||
return $news; |
@@ -2,7 +2,7 @@ | |||
namespace Lc\SovBundle\Factory\Site; | |||
use App\Entity\Site\Page; | |||
use Lc\SovBundle\Container\Site\PageContainer; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
use Lc\SovBundle\Model\Site\PageInterface; | |||
@@ -10,7 +10,8 @@ class PageFactory extends AbstractFactory implements PageFactoryInterface | |||
{ | |||
public function create(): PageInterface | |||
{ | |||
$page = new Page(); | |||
$class = PageContainer::getEntityFqcn(); | |||
$page = new $class; | |||
$page->setStatus(1); | |||
@@ -2,7 +2,7 @@ | |||
namespace Lc\SovBundle\Factory\Site; | |||
use App\Entity\Site\Site; | |||
use Lc\SovBundle\Container\Site\SiteContainer; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
use Lc\SovBundle\Model\Site\SiteInterface; | |||
@@ -10,7 +10,8 @@ class SiteFactory extends AbstractFactory implements SiteFactoryInterface | |||
{ | |||
public function create(string $devAlias = null): SiteInterface | |||
{ | |||
$site = new Site(); | |||
$class = SiteContainer::getEntityFqcn(); | |||
$site = new $class; | |||
$site->setDevAlias($devAlias); | |||
@@ -2,7 +2,7 @@ | |||
namespace Lc\SovBundle\Factory\Ticket; | |||
use App\Entity\Ticket\Ticket; | |||
use Lc\SovBundle\Container\Ticket\TicketContainer; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
use Lc\SovBundle\Model\Ticket\TicketInterface; | |||
use Lc\SovBundle\Model\Ticket\TicketModel; | |||
@@ -11,7 +11,8 @@ class TicketFactory extends AbstractFactory implements TicketFactoryInterface | |||
{ | |||
public function create(): TicketInterface | |||
{ | |||
$ticket = new Ticket(); | |||
$class = TicketContainer::getEntityFqcn(); | |||
$ticket = new $class; | |||
$ticketMessageFactory = new TicketMessageFactory(); | |||
$ticketMessage = $ticketMessageFactory->create($ticket) ; |
@@ -2,7 +2,7 @@ | |||
namespace Lc\SovBundle\Factory\Ticket; | |||
use App\Entity\Ticket\TicketMessage; | |||
use Lc\SovBundle\Container\Ticket\TicketMessageContainer; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
use Lc\SovBundle\Model\Ticket\TicketInterface; | |||
use Lc\SovBundle\Model\Ticket\TicketMessageInterface; | |||
@@ -11,7 +11,8 @@ class TicketMessageFactory extends AbstractFactory implements TicketMessageFacto | |||
{ | |||
public function create(TicketInterface $ticket): TicketMessageInterface | |||
{ | |||
$ticketMessage = new TicketMessage(); | |||
$class = TicketMessageContainer::getEntityFqcn(); | |||
$ticketMessage = new $class; | |||
$ticketMessage->setTicket($ticket); | |||
$ticketMessage->setStatus(1); |
@@ -2,7 +2,7 @@ | |||
namespace Lc\SovBundle\Factory\User; | |||
use App\Entity\User\GroupUser; | |||
use Lc\SovBundle\Container\User\GroupUserContainer; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
use Lc\SovBundle\Model\User\GroupUserInterface; | |||
@@ -10,7 +10,8 @@ class GroupUserFactory extends AbstractFactory implements GroupUserFactoryInterf | |||
{ | |||
public function create(): GroupUserInterface | |||
{ | |||
$groupUser = new GroupUser(); | |||
$class = GroupUserContainer::getEntityFqcn(); | |||
$groupUser = new $class; | |||
$groupUser->setStatus(1); | |||
@@ -2,7 +2,7 @@ | |||
namespace Lc\SovBundle\Factory\User; | |||
use App\Entity\User\User; | |||
use Lc\SovBundle\Container\User\UserContainer; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
use Lc\SovBundle\Model\User\UserInterface; | |||
@@ -10,7 +10,9 @@ class UserFactory extends AbstractFactory | |||
{ | |||
public function create(): UserInterface | |||
{ | |||
$user = new User(); | |||
$class = UserContainer::getEntityFqcn(); | |||
$user = new $class; | |||
return $user; | |||
} |