|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace Lc\SovBundle\Definition; |
|
|
namespace Lc\SovBundle\Definition; |
|
|
|
|
|
|
|
|
|
|
|
use App\Container\LoyaltyProgram\LoyaltyProgramChainingContainer; |
|
|
|
|
|
use App\Container\Merchant\LeavePeriodContainer; |
|
|
use Lc\SovBundle\Container\ComponentContainer; |
|
|
use Lc\SovBundle\Container\ComponentContainer; |
|
|
use Lc\SovBundle\Container\File\FileContainer; |
|
|
use Lc\SovBundle\Container\File\FileContainer; |
|
|
use Lc\SovBundle\Container\Newsletter\NewsletterContainer; |
|
|
use Lc\SovBundle\Container\Newsletter\NewsletterContainer; |
|
|
|
|
|
|
|
|
public static function getContainerList(): array |
|
|
public static function getContainerList(): array |
|
|
{ |
|
|
{ |
|
|
return [ |
|
|
return [ |
|
|
FileContainer::class, |
|
|
|
|
|
NewsletterContainer::class, |
|
|
|
|
|
ReminderContainer::class, |
|
|
|
|
|
NewsContainer::class, |
|
|
|
|
|
PageContainer::class, |
|
|
|
|
|
SiteContainer::class, |
|
|
|
|
|
TicketContainer::class, |
|
|
|
|
|
TicketMessageContainer::class, |
|
|
|
|
|
GroupUserContainer::class, |
|
|
|
|
|
UserContainer::class, |
|
|
|
|
|
SiteSettingContainer::class, |
|
|
|
|
|
ComponentContainer::class |
|
|
|
|
|
|
|
|
FileContainer::class, |
|
|
|
|
|
NewsletterContainer::class, |
|
|
|
|
|
ReminderContainer::class, |
|
|
|
|
|
NewsContainer::class, |
|
|
|
|
|
PageContainer::class, |
|
|
|
|
|
SiteContainer::class, |
|
|
|
|
|
TicketContainer::class, |
|
|
|
|
|
TicketMessageContainer::class, |
|
|
|
|
|
GroupUserContainer::class, |
|
|
|
|
|
UserContainer::class, |
|
|
|
|
|
SiteSettingContainer::class, |
|
|
|
|
|
ComponentContainer::class, |
|
|
]; |
|
|
]; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public function getContainerByEntityFqcn(string $entityFqcn) |
|
|
public function getContainerByEntityFqcn(string $entityFqcn) |
|
|
{ |
|
|
{ |
|
|
foreach (static::getContainerList() as $containerFqcn){ |
|
|
|
|
|
if($this->isContainerManageEntity($containerFqcn)){ |
|
|
|
|
|
|
|
|
foreach (static::getContainerList() as $containerFqcn) { |
|
|
|
|
|
if ($this->isContainerManageEntity($containerFqcn)) { |
|
|
if ($containerFqcn::getEntityFqcn() == $entityFqcn) { |
|
|
if ($containerFqcn::getEntityFqcn() == $entityFqcn) { |
|
|
return $containerFqcn; |
|
|
return $containerFqcn; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function isContainerManageEntity(string $containerFqcn) |
|
|
public function isContainerManageEntity(string $containerFqcn) |
|
|
{ |
|
|
{ |
|
|
if(method_exists($containerFqcn, 'getEntityFqcn') ){ |
|
|
|
|
|
|
|
|
if (method_exists($containerFqcn, 'getEntityFqcn')) { |
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
|
return false; |
|
|
return false; |