Bladeren bron

AbstractFieldDefinition : pageName

develop
Guillaume Bourgeois 1 jaar geleden
bovenliggende
commit
ccb204c88b
2 gewijzigde bestanden met toevoegingen van 19 en 17 verwijderingen
  1. +17
    -15
      Definition/ApplicationDefinition.php
  2. +2
    -2
      Definition/Field/AbstractFieldDefinition.php

+ 17
- 15
Definition/ApplicationDefinition.php Bestand weergeven

@@ -2,6 +2,8 @@

namespace Lc\SovBundle\Definition;

use App\Container\LoyaltyProgram\LoyaltyProgramChainingContainer;
use App\Container\Merchant\LeavePeriodContainer;
use Lc\SovBundle\Container\ComponentContainer;
use Lc\SovBundle\Container\File\FileContainer;
use Lc\SovBundle\Container\Newsletter\NewsletterContainer;
@@ -22,25 +24,25 @@ class ApplicationDefinition
public static function getContainerList(): array
{
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)
{
foreach (static::getContainerList() as $containerFqcn){
if($this->isContainerManageEntity($containerFqcn)){
foreach (static::getContainerList() as $containerFqcn) {
if ($this->isContainerManageEntity($containerFqcn)) {
if ($containerFqcn::getEntityFqcn() == $entityFqcn) {
return $containerFqcn;
}
@@ -51,7 +53,7 @@ class ApplicationDefinition

public function isContainerManageEntity(string $containerFqcn)
{
if(method_exists($containerFqcn, 'getEntityFqcn') ){
if (method_exists($containerFqcn, 'getEntityFqcn')) {
return true;
}
return false;

+ 2
- 2
Definition/Field/AbstractFieldDefinition.php Bestand weergeven

@@ -126,11 +126,11 @@ abstract class AbstractFieldDefinition
return [];
}

public function getAllFields(): array
public function getAllFields(string $pageName = null, $entity = null): array
{
return array_merge(
$this->configureFieldsBase(),
$this->configureFields(),
$this->configureFields($pageName, $entity),
);
}


Laden…
Annuleren
Opslaan