Quellcode durchsuchen

ticker+reminder

feature/ticket
Charly vor 3 Jahren
Ursprung
Commit
4423ddeb00
10 geänderte Dateien mit 137 neuen und 5 gelöschten Zeilen
  1. +4
    -1
      config/packages/doctrine.yaml
  2. +4
    -1
      config/services.yaml
  3. +36
    -0
      migrations/Version20210614072530.php
  4. +1
    -0
      src/Controller/Dashboard/DashboardAdminController.php
  5. +1
    -2
      src/Definition/MerchantSettingDefinition.php
  6. +1
    -1
      src/Definition/SectionSettingDefinition.php
  7. +35
    -0
      src/Definition/SiteSettingDefinition.php
  8. +25
    -0
      src/Entity/Setting/SiteSetting.php
  9. +25
    -0
      src/Entity/Site/Site.php
  10. +5
    -0
      translations/admin.fr.yaml

+ 4
- 1
config/packages/doctrine.yaml Datei anzeigen

@@ -17,6 +17,8 @@ doctrine:
Lc\SovBundle\Model\User\UserInterface: App\Entity\User\User
Lc\SovBundle\Model\File\FileInterface: App\Entity\File\File
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\Config\TaxRateInterface: App\Entity\Config\TaxRate
Lc\CaracoleBundle\Model\Config\UnitInterface: App\Entity\Config\Unit
@@ -43,8 +45,8 @@ doctrine:
Lc\CaracoleBundle\Model\Reduction\ReductionCartInterface: App\Entity\Reduction\ReductionCart
Lc\CaracoleBundle\Model\Reduction\ReductionCatalogInterface: App\Entity\Reduction\ReductionCatalog
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\SovBundle\Model\Site\SiteInterface: App\Entity\Site\Site
Lc\CaracoleBundle\Model\Site\NewsInterface: App\Entity\Site\News
Lc\CaracoleBundle\Model\Site\PageInterface: App\Entity\Site\Page
Lc\SovBundle\Model\Ticket\TicketInterface: App\Entity\Ticket\Ticket
@@ -53,5 +55,6 @@ doctrine:
Lc\CaracoleBundle\Model\User\UserInterface: App\Entity\User\User
Lc\CaracoleBundle\Model\User\UserPointSaleInterface: App\Entity\User\UserPointSale
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\SectionSettingInterface: App\Entity\Setting\SectionSetting

+ 4
- 1
config/services.yaml Datei anzeigen

@@ -50,4 +50,7 @@ services:
# please note that last definitions always *replace* previous ones

Lc\CaracoleBundle\Definition\MerchantSettingDefinition:
class: App\Definition\MerchantSettingDefinition
class: App\Definition\MerchantSettingDefinition

Lc\SovBundle\Definition\SiteSettingDefinition:
class: App\Definition\SiteSettingDefinition

+ 36
- 0
migrations/Version20210614072530.php Datei anzeigen

@@ -0,0 +1,36 @@
<?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');
}
}

+ 1
- 0
src/Controller/Dashboard/DashboardAdminController.php Datei anzeigen

@@ -35,6 +35,7 @@ class DashboardAdminController extends CaracDashboardController
[
MenuItem::linkToRoute('setting_merchant', '', 'carac_admin_setting_merchant'),
MenuItem::linkToRoute('setting_section', '', 'carac_admin_setting_section'),
MenuItem::linkToRoute('setting_global', '', 'carac_admin_setting_global'),
]
);


+ 1
- 2
src/Definition/MerchantSettingDefinition.php Datei anzeigen

@@ -3,9 +3,8 @@
namespace App\Definition;

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';


+ 1
- 1
src/Definition/SectionSettingDefinition.php Datei anzeigen

@@ -3,8 +3,8 @@
namespace App\Definition;

use App\Entity\Section\Section;
use Lc\CaracoleBundle\Definition\AbstractSettingDefinition;
use Lc\CaracoleBundle\Definition\SectionSettingDefinitionInterface;
use Lc\SovBundle\Definition\AbstractSettingDefinition;

class SectionSettingDefinition extends AbstractSettingDefinition implements SectionSettingDefinitionInterface
{

+ 35
- 0
src/Definition/SiteSettingDefinition.php Datei anzeigen

@@ -0,0 +1,35 @@
<?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,
]);
}

}

+ 25
- 0
src/Entity/Setting/SiteSetting.php Datei anzeigen

@@ -0,0 +1,25 @@
<?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;
}
}

+ 25
- 0
src/Entity/Site/Site.php Datei anzeigen

@@ -0,0 +1,25 @@
<?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;
}
}

+ 5
- 0
translations/admin.fr.yaml Datei anzeigen

@@ -1,4 +1,9 @@
setting_definition:
global:
categories:
general: Général
settings:
exampleText: Exemple texte
merchant:
categories:
email: Email

Laden…
Abbrechen
Speichern