Lc\SovBundle\Model\User\UserInterface: App\Entity\User\User | Lc\SovBundle\Model\User\UserInterface: App\Entity\User\User | ||||
Lc\SovBundle\Model\File\FileInterface: App\Entity\File\File | Lc\SovBundle\Model\File\FileInterface: App\Entity\File\File | ||||
Lc\SovBundle\Model\User\GroupUserInterface: App\Entity\User\GroupUser | Lc\SovBundle\Model\User\GroupUserInterface: App\Entity\User\GroupUser | ||||
Lc\SovBundle\Model\Reminder\ReminderInterface: App\Entity\Reminder\Reminder | |||||
Lc\CaracoleBundle\Model\Address\AddressInterface: App\Entity\Address\Address | Lc\CaracoleBundle\Model\Address\AddressInterface: App\Entity\Address\Address | ||||
Lc\CaracoleBundle\Model\Config\TaxRateInterface: App\Entity\Config\TaxRate | Lc\CaracoleBundle\Model\Config\TaxRateInterface: App\Entity\Config\TaxRate | ||||
Lc\CaracoleBundle\Model\Config\UnitInterface: App\Entity\Config\Unit | Lc\CaracoleBundle\Model\Config\UnitInterface: App\Entity\Config\Unit | ||||
Lc\CaracoleBundle\Model\Reduction\ReductionCartInterface: App\Entity\Reduction\ReductionCart | Lc\CaracoleBundle\Model\Reduction\ReductionCartInterface: App\Entity\Reduction\ReductionCart | ||||
Lc\CaracoleBundle\Model\Reduction\ReductionCatalogInterface: App\Entity\Reduction\ReductionCatalog | Lc\CaracoleBundle\Model\Reduction\ReductionCatalogInterface: App\Entity\Reduction\ReductionCatalog | ||||
Lc\CaracoleBundle\Model\Reduction\ReductionCreditInterface: App\Entity\Reduction\ReductionCredit | Lc\CaracoleBundle\Model\Reduction\ReductionCreditInterface: App\Entity\Reduction\ReductionCredit | ||||
Lc\CaracoleBundle\Model\Reminder\ReminderInterface: App\Entity\Reminder\Reminder | |||||
Lc\CaracoleBundle\Model\Section\SectionInterface: App\Entity\Section\Section | Lc\CaracoleBundle\Model\Section\SectionInterface: App\Entity\Section\Section | ||||
Lc\SovBundle\Model\Site\SiteInterface: App\Entity\Site\Site | |||||
Lc\CaracoleBundle\Model\Site\NewsInterface: App\Entity\Site\News | Lc\CaracoleBundle\Model\Site\NewsInterface: App\Entity\Site\News | ||||
Lc\CaracoleBundle\Model\Site\PageInterface: App\Entity\Site\Page | Lc\CaracoleBundle\Model\Site\PageInterface: App\Entity\Site\Page | ||||
Lc\SovBundle\Model\Ticket\TicketInterface: App\Entity\Ticket\Ticket | Lc\SovBundle\Model\Ticket\TicketInterface: App\Entity\Ticket\Ticket | ||||
Lc\CaracoleBundle\Model\User\UserInterface: App\Entity\User\User | Lc\CaracoleBundle\Model\User\UserInterface: App\Entity\User\User | ||||
Lc\CaracoleBundle\Model\User\UserPointSaleInterface: App\Entity\User\UserPointSale | Lc\CaracoleBundle\Model\User\UserPointSaleInterface: App\Entity\User\UserPointSale | ||||
Lc\CaracoleBundle\Model\User\VisitorInterface: App\Entity\User\Visitor | Lc\CaracoleBundle\Model\User\VisitorInterface: App\Entity\User\Visitor | ||||
Lc\SovBundle\Model\Setting\SiteSettingInterface: App\Entity\Setting\SiteSetting | |||||
Lc\CaracoleBundle\Model\Setting\MerchantSettingInterface: App\Entity\Setting\MerchantSetting | Lc\CaracoleBundle\Model\Setting\MerchantSettingInterface: App\Entity\Setting\MerchantSetting | ||||
Lc\CaracoleBundle\Model\Setting\SectionSettingInterface: App\Entity\Setting\SectionSetting | Lc\CaracoleBundle\Model\Setting\SectionSettingInterface: App\Entity\Setting\SectionSetting |
# please note that last definitions always *replace* previous ones | # please note that last definitions always *replace* previous ones | ||||
Lc\CaracoleBundle\Definition\MerchantSettingDefinition: | Lc\CaracoleBundle\Definition\MerchantSettingDefinition: | ||||
class: App\Definition\MerchantSettingDefinition | |||||
class: App\Definition\MerchantSettingDefinition | |||||
Lc\SovBundle\Definition\SiteSettingDefinition: | |||||
class: App\Definition\SiteSettingDefinition |
<?php | |||||
declare(strict_types=1); | |||||
namespace DoctrineMigrations; | |||||
use Doctrine\DBAL\Schema\Schema; | |||||
use Doctrine\Migrations\AbstractMigration; | |||||
/** | |||||
* Auto-generated Migration: Please modify to your needs! | |||||
*/ | |||||
final class Version20210614072530 extends AbstractMigration | |||||
{ | |||||
public function getDescription(): string | |||||
{ | |||||
return ''; | |||||
} | |||||
public function up(Schema $schema): void | |||||
{ | |||||
// this up() migration is auto-generated, please modify it to your needs | |||||
$this->addSql('CREATE TABLE site (id INT AUTO_INCREMENT NOT NULL, dev_alias VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); | |||||
$this->addSql('CREATE TABLE site_setting (id INT AUTO_INCREMENT NOT NULL, site_id INT NOT NULL, file_id INT DEFAULT NULL, name VARCHAR(63) NOT NULL, text LONGTEXT DEFAULT NULL, date DATETIME DEFAULT NULL, INDEX IDX_64D05A53F6BD1646 (site_id), INDEX IDX_64D05A5393CB796C (file_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); | |||||
$this->addSql('ALTER TABLE site_setting ADD CONSTRAINT FK_64D05A53F6BD1646 FOREIGN KEY (site_id) REFERENCES site (id)'); | |||||
$this->addSql('ALTER TABLE site_setting ADD CONSTRAINT FK_64D05A5393CB796C FOREIGN KEY (file_id) REFERENCES file (id)'); | |||||
} | |||||
public function down(Schema $schema): void | |||||
{ | |||||
// this down() migration is auto-generated, please modify it to your needs | |||||
$this->addSql('ALTER TABLE site_setting DROP FOREIGN KEY FK_64D05A53F6BD1646'); | |||||
$this->addSql('DROP TABLE site'); | |||||
$this->addSql('DROP TABLE site_setting'); | |||||
} | |||||
} |
[ | [ | ||||
MenuItem::linkToRoute('setting_merchant', '', 'carac_admin_setting_merchant'), | MenuItem::linkToRoute('setting_merchant', '', 'carac_admin_setting_merchant'), | ||||
MenuItem::linkToRoute('setting_section', '', 'carac_admin_setting_section'), | MenuItem::linkToRoute('setting_section', '', 'carac_admin_setting_section'), | ||||
MenuItem::linkToRoute('setting_global', '', 'carac_admin_setting_global'), | |||||
] | ] | ||||
); | ); | ||||
namespace App\Definition; | namespace App\Definition; | ||||
use Lc\CaracoleBundle\Definition\MerchantSettingDefinition as CaracMerchantSettingDefinition; | use Lc\CaracoleBundle\Definition\MerchantSettingDefinition as CaracMerchantSettingDefinition; | ||||
use Lc\CaracoleBundle\Model\Setting\MerchantSettingInterface; | |||||
class MerchantSettingDefinition extends CaracMerchantSettingDefinition implements MerchantSettingInterface | |||||
class MerchantSettingDefinition extends CaracMerchantSettingDefinition | |||||
{ | { | ||||
const CATEGORY_EMAIL = 'email'; | const CATEGORY_EMAIL = 'email'; | ||||
namespace App\Definition; | namespace App\Definition; | ||||
use App\Entity\Section\Section; | use App\Entity\Section\Section; | ||||
use Lc\CaracoleBundle\Definition\AbstractSettingDefinition; | |||||
use Lc\CaracoleBundle\Definition\SectionSettingDefinitionInterface; | use Lc\CaracoleBundle\Definition\SectionSettingDefinitionInterface; | ||||
use Lc\SovBundle\Definition\AbstractSettingDefinition; | |||||
class SectionSettingDefinition extends AbstractSettingDefinition implements SectionSettingDefinitionInterface | class SectionSettingDefinition extends AbstractSettingDefinition implements SectionSettingDefinitionInterface | ||||
{ | { |
<?php | |||||
namespace App\Definition; | |||||
use Lc\SovBundle\Definition\SiteSettingDefinition as SovSiteSettingDefinition; | |||||
class SiteSettingDefinition extends SovSiteSettingDefinition | |||||
{ | |||||
const CATEGORY_GENERAL = 'general'; | |||||
const SETTING_EXAMPLE_TEXT = 'exampleText'; | |||||
public function __construct() | |||||
{ | |||||
parent::__construct() ; | |||||
// général | |||||
$this | |||||
->addSettingText( | |||||
[ | |||||
'name' => self::SETTING_EXAMPLE_TEXT, | |||||
'category' => self::CATEGORY_GENERAL, | |||||
] | |||||
); | |||||
} | |||||
public function getCategories() | |||||
{ | |||||
return array_merge(parent::getCategories(), [ | |||||
self::CATEGORY_GENERAL, | |||||
]); | |||||
} | |||||
} |
<?php | |||||
namespace App\Entity\Setting; | |||||
use Lc\SovBundle\Repository\Setting\SiteSettingRepository; | |||||
use Doctrine\ORM\Mapping as ORM; | |||||
use Lc\SovBundle\Model\Setting\SiteSettingModel; | |||||
/** | |||||
* @ORM\Entity(repositoryClass=SiteSettingRepository::class) | |||||
*/ | |||||
class SiteSetting extends SiteSettingModel | |||||
{ | |||||
/** | |||||
* @ORM\Id | |||||
* @ORM\GeneratedValue | |||||
* @ORM\Column(type="integer") | |||||
*/ | |||||
private $id; | |||||
public function getId(): ?int | |||||
{ | |||||
return $this->id; | |||||
} | |||||
} |
<?php | |||||
namespace App\Entity\Site; | |||||
use Lc\SovBundle\Repository\Site\SiteRepository; | |||||
use Doctrine\ORM\Mapping as ORM; | |||||
use Lc\SovBundle\Model\Site\SiteModel; | |||||
/** | |||||
* @ORM\Entity(repositoryClass=SiteRepository::class) | |||||
*/ | |||||
class Site extends SiteModel | |||||
{ | |||||
/** | |||||
* @ORM\Id | |||||
* @ORM\GeneratedValue | |||||
* @ORM\Column(type="integer") | |||||
*/ | |||||
private $id; | |||||
public function getId(): ?int | |||||
{ | |||||
return $this->id; | |||||
} | |||||
} |
setting_definition: | setting_definition: | ||||
global: | |||||
categories: | |||||
general: Général | |||||
settings: | |||||
exampleText: Exemple texte | |||||
merchant: | merchant: | ||||
categories: | categories: | ||||
email: Email | email: Email |