artgris_file_manager: | artgris_file_manager: | ||||
conf: | conf: | ||||
default: | |||||
image: | |||||
dir: "../public%app.path_uploads%" | dir: "../public%app.path_uploads%" | ||||
type: 'image' | type: 'image' | ||||
file: | |||||
dir: "../public%app.path_uploads%" | |||||
type: 'file' |
Lc\CaracoleBundle\Model\Credit\CreditConfigInterface: App\Entity\Credit\CreditConfig | Lc\CaracoleBundle\Model\Credit\CreditConfigInterface: App\Entity\Credit\CreditConfig | ||||
Lc\CaracoleBundle\Model\Credit\CreditHistoryInterface: App\Entity\Credit\CreditHistory | Lc\CaracoleBundle\Model\Credit\CreditHistoryInterface: App\Entity\Credit\CreditHistory | ||||
Lc\CaracoleBundle\Model\File\DocumentInterface: App\Entity\File\Document | Lc\CaracoleBundle\Model\File\DocumentInterface: App\Entity\File\Document | ||||
Lc\CaracoleBundle\Model\Merchant\MerchantConfigInterface: App\Entity\Merchant\MerchantConfig | |||||
Lc\CaracoleBundle\Model\Merchant\MerchantInterface: App\Entity\Merchant\Merchant | Lc\CaracoleBundle\Model\Merchant\MerchantInterface: App\Entity\Merchant\Merchant | ||||
Lc\CaracoleBundle\Model\Newsletter\NewsletterInterface: App\Entity\Newsletter\Newsletter | Lc\CaracoleBundle\Model\Newsletter\NewsletterInterface: App\Entity\Newsletter\Newsletter | ||||
Lc\CaracoleBundle\Model\Order\OrderPaymentInterface: App\Entity\Order\OrderPayment | Lc\CaracoleBundle\Model\Order\OrderPaymentInterface: App\Entity\Order\OrderPayment | ||||
Lc\CaracoleBundle\Model\User\UserMerchantInterface: App\Entity\User\UserMerchant | Lc\CaracoleBundle\Model\User\UserMerchantInterface: App\Entity\User\UserMerchant | ||||
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\CaracoleBundle\Model\Setting\MerchantSettingInterface: App\Entity\Setting\MerchantSetting | |||||
Lc\CaracoleBundle\Model\Setting\SectionSettingInterface: App\Entity\Setting\SectionSetting |
<?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 Version20210605195723 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 merchant_setting (id INT AUTO_INCREMENT NOT NULL, merchant_id INT NOT NULL, name VARCHAR(63) NOT NULL, value LONGTEXT DEFAULT NULL, INDEX IDX_464ACD036796D554 (merchant_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); | |||||
$this->addSql('CREATE TABLE section_setting (id INT AUTO_INCREMENT NOT NULL, section_id INT NOT NULL, name VARCHAR(63) NOT NULL, value LONGTEXT DEFAULT NULL, INDEX IDX_4D337597D823E37A (section_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); | |||||
$this->addSql('ALTER TABLE merchant_setting ADD CONSTRAINT FK_464ACD036796D554 FOREIGN KEY (merchant_id) REFERENCES merchant (id)'); | |||||
$this->addSql('ALTER TABLE section_setting ADD CONSTRAINT FK_4D337597D823E37A FOREIGN KEY (section_id) REFERENCES section (id)'); | |||||
} | |||||
public function down(Schema $schema): void | |||||
{ | |||||
// this down() migration is auto-generated, please modify it to your needs | |||||
$this->addSql('DROP TABLE merchant_setting'); | |||||
$this->addSql('DROP TABLE section_setting'); | |||||
} | |||||
} |
<?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 Version20210606143911 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('ALTER TABLE merchant_setting ADD date DATETIME DEFAULT NULL, CHANGE value text LONGTEXT DEFAULT NULL'); | |||||
$this->addSql('ALTER TABLE section_setting ADD date DATETIME DEFAULT NULL, CHANGE value text LONGTEXT DEFAULT NULL'); | |||||
} | |||||
public function down(Schema $schema): void | |||||
{ | |||||
// this down() migration is auto-generated, please modify it to your needs | |||||
$this->addSql('ALTER TABLE merchant_setting DROP date, CHANGE text value LONGTEXT CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`'); | |||||
$this->addSql('ALTER TABLE section_setting DROP date, CHANGE text value LONGTEXT CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`'); | |||||
} | |||||
} |
<?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 Version20210606145644 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('ALTER TABLE merchant_setting ADD file_id INT DEFAULT NULL'); | |||||
$this->addSql('ALTER TABLE merchant_setting ADD CONSTRAINT FK_464ACD0393CB796C FOREIGN KEY (file_id) REFERENCES file (id)'); | |||||
$this->addSql('CREATE INDEX IDX_464ACD0393CB796C ON merchant_setting (file_id)'); | |||||
$this->addSql('ALTER TABLE section_setting ADD file_id INT DEFAULT NULL'); | |||||
$this->addSql('ALTER TABLE section_setting ADD CONSTRAINT FK_4D33759793CB796C FOREIGN KEY (file_id) REFERENCES file (id)'); | |||||
$this->addSql('CREATE INDEX IDX_4D33759793CB796C ON section_setting (file_id)'); | |||||
} | |||||
public function down(Schema $schema): void | |||||
{ | |||||
// this down() migration is auto-generated, please modify it to your needs | |||||
$this->addSql('ALTER TABLE merchant_setting DROP FOREIGN KEY FK_464ACD0393CB796C'); | |||||
$this->addSql('DROP INDEX IDX_464ACD0393CB796C ON merchant_setting'); | |||||
$this->addSql('ALTER TABLE merchant_setting DROP file_id'); | |||||
$this->addSql('ALTER TABLE section_setting DROP FOREIGN KEY FK_4D33759793CB796C'); | |||||
$this->addSql('DROP INDEX IDX_4D33759793CB796C ON section_setting'); | |||||
$this->addSql('ALTER TABLE section_setting DROP file_id'); | |||||
} | |||||
} |
<?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 Version20210607084117 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('DROP TABLE merchant_config'); | |||||
} | |||||
public function down(Schema $schema): void | |||||
{ | |||||
// this down() migration is auto-generated, please modify it to your needs | |||||
$this->addSql('CREATE TABLE merchant_config (id INT AUTO_INCREMENT NOT NULL, merchant_id INT NOT NULL, created_by_id INT NOT NULL, updated_by_id INT NOT NULL, image_id INT DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, dev_alias VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, name VARCHAR(63) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, value LONGTEXT CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, INDEX IDX_3CA56895896DBBDE (updated_by_id), INDEX IDX_3CA568956796D554 (merchant_id), INDEX IDX_3CA568953DA5256D (image_id), INDEX IDX_3CA56895B03A8386 (created_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' '); | |||||
$this->addSql('ALTER TABLE merchant_config ADD CONSTRAINT FK_3CA568953DA5256D FOREIGN KEY (image_id) REFERENCES file (id)'); | |||||
$this->addSql('ALTER TABLE merchant_config ADD CONSTRAINT FK_3CA568956796D554 FOREIGN KEY (merchant_id) REFERENCES merchant (id)'); | |||||
$this->addSql('ALTER TABLE merchant_config ADD CONSTRAINT FK_3CA56895896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)'); | |||||
$this->addSql('ALTER TABLE merchant_config ADD CONSTRAINT FK_3CA56895B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)'); | |||||
} | |||||
} |
MenuItem::linkToCrud('user_index', '', User::class), | MenuItem::linkToCrud('user_index', '', User::class), | ||||
] | ] | ||||
); | ); | ||||
yield MenuItem::subMenu('account', 'user')->setSubItems( | |||||
yield MenuItem::subMenu('setting', 'circle')->setSubItems( | |||||
[ | [ | ||||
MenuItem::linkToRoute('account_profile', '', 'sov_admin_account_profile'), | |||||
MenuItem::linkToRoute('account_password', '', 'sov_admin_account_password'), | |||||
MenuItem::linkToRoute('setting_merchant', 'circle', 'carac_admin_setting_merchant'), | |||||
MenuItem::linkToRoute('setting_section', 'circle', 'carac_admin_setting_section'), | |||||
] | ] | ||||
); | ); | ||||
MenuItem::linkToCrud('admin_tva', 'circle', TaxRate::class), | MenuItem::linkToCrud('admin_tva', 'circle', TaxRate::class), | ||||
] | ] | ||||
); | ); | ||||
yield MenuItem::subMenu('account', 'user')->setSubItems( | |||||
[ | |||||
MenuItem::linkToRoute('account_profile', '', 'sov_admin_account_profile'), | |||||
MenuItem::linkToRoute('account_password', '', 'sov_admin_account_password'), | |||||
] | |||||
); | |||||
} | } | ||||
public function index(): Response | public function index(): Response | ||||
{ | { | ||||
return $this->render('admin/dashboard.html.twig'); | |||||
return $this->render('admin/dashboard/dashboard.html.twig'); | |||||
} | } | ||||
/*public function configureMenuItems(): iterable | /*public function configureMenuItems(): iterable |
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField; | use EasyCorp\Bundle\EasyAdminBundle\Field\TextField; | ||||
use Lc\CaracoleBundle\Controller\AbstractAdminController; | use Lc\CaracoleBundle\Controller\AbstractAdminController; | ||||
use Lc\SovBundle\Field\CKEditorField; | use Lc\SovBundle\Field\CKEditorField; | ||||
use Lc\SovBundle\Field\ImageManagerField; | |||||
use Lc\SovBundle\Field\StatusField; | use Lc\SovBundle\Field\StatusField; | ||||
use Lc\SovBundle\Form\Common\FileManagerType; | |||||
class PageAdminController extends AbstractAdminController | class PageAdminController extends AbstractAdminController | ||||
{ | { | ||||
[ | [ | ||||
FormField::addPanel('general'), | FormField::addPanel('general'), | ||||
TextField::new('title'), | TextField::new('title'), | ||||
ImageManagerField::new('image'), | |||||
NumberField::new('position')->hideOnForm(), | NumberField::new('position')->hideOnForm(), | ||||
StatusField::new('status'), | StatusField::new('status'), | ||||
CKEditorField::new('description'), | CKEditorField::new('description'), |
<?php | |||||
namespace App\Definition; | |||||
use Lc\CaracoleBundle\Definition\AbstractSettingDefinition; | |||||
use Lc\CaracoleBundle\Definition\MerchantSettingDefinitionInterface; | |||||
class MerchantSettingDefinition extends AbstractSettingDefinition implements MerchantSettingDefinitionInterface | |||||
{ | |||||
const CATEGORY_GENERAL = 'general'; | |||||
const CATEGORY_EMAIL = 'email'; | |||||
const SETTING_EXAMPLE_TEXT = 'exampleText'; | |||||
const SETTING_EXAMPLE_TEXTAREA = 'exampleTextarea'; | |||||
const SETTING_EXAMPLE_TEXTAREA_ADVANCED = 'exampleTextareaAdvanced'; | |||||
const SETTING_EXAMPLE_TEXT2 = 'exampleText2'; | |||||
const SETTING_EXAMPLE_SELECT = 'exampleSelect'; | |||||
const SETTING_EXAMPLE_RADIO = 'exampleRadio'; | |||||
const SETTING_EXAMPLE_DATE = 'exampleDate'; | |||||
const SETTING_EXAMPLE_TIME = 'exampleTime'; | |||||
const SETTING_EXAMPLE_FILE = 'exampleFile'; | |||||
const SETTING_EXAMPLE_IMAGE = 'exampleImage'; | |||||
public function __construct() | |||||
{ | |||||
// général | |||||
$this | |||||
->addSettingText( | |||||
[ | |||||
'name' => self::SETTING_EXAMPLE_TEXT, | |||||
'category' => self::CATEGORY_GENERAL, | |||||
'default' => 'caracole !' | |||||
] | |||||
) | |||||
->addSettingTextarea( | |||||
[ | |||||
'name' => self::SETTING_EXAMPLE_TEXTAREA, | |||||
'category' => self::CATEGORY_GENERAL, | |||||
'default' => 'test' | |||||
] | |||||
) | |||||
->addSettingTextareaAdvanced( | |||||
[ | |||||
'name' => self::SETTING_EXAMPLE_TEXTAREA_ADVANCED, | |||||
'category' => self::CATEGORY_GENERAL | |||||
] | |||||
) | |||||
->addSettingSelect( | |||||
[ | |||||
'name' => self::SETTING_EXAMPLE_SELECT, | |||||
'category' => self::CATEGORY_GENERAL, | |||||
'choices' => [ | |||||
'Select 1' => 1, | |||||
'Select 2' => 2, | |||||
] | |||||
] | |||||
) | |||||
->addSettingRadio( | |||||
[ | |||||
'name' => self::SETTING_EXAMPLE_RADIO, | |||||
'category' => self::CATEGORY_GENERAL, | |||||
'choices' => [ | |||||
'Radio 1' => 1, | |||||
'Radio 2' => 2, | |||||
] | |||||
] | |||||
) | |||||
->addSettingDate( | |||||
[ | |||||
'name' => self::SETTING_EXAMPLE_DATE, | |||||
'category' => self::CATEGORY_GENERAL | |||||
] | |||||
) | |||||
->addSettingTime( | |||||
[ | |||||
'name' => self::SETTING_EXAMPLE_TIME, | |||||
'category' => self::CATEGORY_GENERAL | |||||
] | |||||
) | |||||
->addSettingFile( | |||||
[ | |||||
'name' => self::SETTING_EXAMPLE_FILE, | |||||
'category' => self::CATEGORY_GENERAL | |||||
] | |||||
) | |||||
->addSettingImage( | |||||
[ | |||||
'name' => self::SETTING_EXAMPLE_IMAGE, | |||||
'category' => self::CATEGORY_GENERAL | |||||
] | |||||
); | |||||
$this | |||||
->addSettingText( | |||||
[ | |||||
'name' => self::SETTING_EXAMPLE_TEXT2, | |||||
'category' => self::CATEGORY_EMAIL | |||||
] | |||||
); | |||||
} | |||||
public function getCategories() | |||||
{ | |||||
return [ | |||||
self::CATEGORY_GENERAL, | |||||
self::CATEGORY_EMAIL, | |||||
]; | |||||
} | |||||
} |
<?php | |||||
namespace App\Definition; | |||||
use App\Entity\Section\Section; | |||||
use Lc\CaracoleBundle\Definition\AbstractSettingDefinition; | |||||
use Lc\CaracoleBundle\Definition\SectionSettingDefinitionInterface; | |||||
class SectionSettingDefinition extends AbstractSettingDefinition implements SectionSettingDefinitionInterface | |||||
{ | |||||
const CATEGORY_GENERAL = 'general'; | |||||
const CATEGORY_CONFIGURATION = 'configuration'; | |||||
const CATEGORY_SPECIFIC = 'specific'; | |||||
const SETTING_EXAMPLE_TEXT = 'exampleText'; | |||||
const SETTING_EXAMPLE_TEXT2 = 'exampleText2'; | |||||
const SETTING_EXAMPLE_SPECIFIC_SECTION = 'exampleSpecificSection'; | |||||
public function __construct() | |||||
{ | |||||
// général | |||||
$this | |||||
->addSettingText( | |||||
[ | |||||
'name' => self::SETTING_EXAMPLE_TEXT, | |||||
'category' => self::CATEGORY_GENERAL | |||||
] | |||||
); | |||||
// configuration | |||||
$this | |||||
->addSettingText( | |||||
[ | |||||
'name' => self::SETTING_EXAMPLE_TEXT2, | |||||
'category' => self::CATEGORY_CONFIGURATION | |||||
] | |||||
); | |||||
// spécifique | |||||
$this | |||||
->addSettingText( | |||||
[ | |||||
'name' => self::SETTING_EXAMPLE_SPECIFIC_SECTION, | |||||
'category' => self::CATEGORY_SPECIFIC, | |||||
'section' => Section::SECTION_LUNCH | |||||
] | |||||
); | |||||
} | |||||
public function getCategories() | |||||
{ | |||||
return [ | |||||
self::CATEGORY_GENERAL, | |||||
self::CATEGORY_CONFIGURATION, | |||||
self::CATEGORY_SPECIFIC, | |||||
]; | |||||
} | |||||
} |
<?php | |||||
namespace App\Entity\Merchant; | |||||
use Lc\CaracoleBundle\Model\Merchant\MerchantConfigModel; | |||||
use Lc\CaracoleBundle\Repository\Merchant\MerchantConfigRepository; | |||||
use Doctrine\ORM\Mapping as ORM; | |||||
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | |||||
/** | |||||
* @ORM\Entity(repositoryClass=MerchantConfigRepository::class) | |||||
*/ | |||||
class MerchantConfig extends MerchantConfigModel implements MerchantInterface | |||||
{ | |||||
/** | |||||
* @ORM\Id | |||||
* @ORM\GeneratedValue | |||||
* @ORM\Column(type="integer") | |||||
*/ | |||||
private $id; | |||||
public function getId(): ?int | |||||
{ | |||||
return $this->id; | |||||
} | |||||
} |
*/ | */ | ||||
private $id; | private $id; | ||||
const SECTION_MARKET = 'market' ; | |||||
const SECTION_LUNCH = 'lunch' ; | |||||
public function getId(): ?int | public function getId(): ?int | ||||
{ | { | ||||
return $this->id; | return $this->id; |
<?php | |||||
namespace App\Entity\Setting; | |||||
use Lc\CaracoleBundle\Model\Setting\MerchantSettingInterface; | |||||
use Lc\CaracoleBundle\Model\Setting\MerchantSettingModel; | |||||
use Lc\CaracoleBundle\Repository\Setting\MerchantSettingRepository; | |||||
use Doctrine\ORM\Mapping as ORM; | |||||
/** | |||||
* @ORM\Entity(repositoryClass=MerchantSettingRepository::class) | |||||
*/ | |||||
class MerchantSetting extends MerchantSettingModel implements MerchantSettingInterface | |||||
{ | |||||
/** | |||||
* @ORM\Id | |||||
* @ORM\GeneratedValue | |||||
* @ORM\Column(type="integer") | |||||
*/ | |||||
private $id; | |||||
public function getId(): ?int | |||||
{ | |||||
return $this->id; | |||||
} | |||||
} |
<?php | |||||
namespace App\Entity\Setting; | |||||
use Lc\CaracoleBundle\Model\Setting\SectionSettingInterface; | |||||
use Lc\CaracoleBundle\Model\Setting\SectionSettingModel; | |||||
use Lc\CaracoleBundle\Repository\Setting\SectionSettingRepository; | |||||
use Doctrine\ORM\Mapping as ORM; | |||||
/** | |||||
* @ORM\Entity(repositoryClass=SectionSettingRepository::class) | |||||
*/ | |||||
class SectionSetting extends SectionSettingModel implements SectionSettingInterface | |||||
{ | |||||
/** | |||||
* @ORM\Id | |||||
* @ORM\GeneratedValue | |||||
* @ORM\Column(type="integer") | |||||
*/ | |||||
private $id; | |||||
public function getId(): ?int | |||||
{ | |||||
return $this->id; | |||||
} | |||||
} |
setting_definition: | |||||
merchant: | |||||
categories: | |||||
general: Général | |||||
email: Email | |||||
settings: | |||||
exampleText: Texte | |||||
exampleText2: Texte 2 | |||||
exampleChoice: Choix | |||||
exampleTextarea: Textarea | |||||
exampleTextareaAdvanced: Textarea avancé | |||||
exampleSelect: Select | |||||
exampleRadio: Radio | |||||
exampleDate: Exemple date | |||||
exampleTime: Exemple time | |||||
exampleFile: Exemple fichier | |||||
exampleImage: Exemple image | |||||
section: | |||||
categories: | |||||
general: Général | |||||
configuration: Configuration | |||||
specific: Spécifique | |||||
settings: | |||||
exampleText: Texte | |||||
exampleText2: Texte 2 | |||||
exampleSpecificSection: Section spécifique |