createDefaultSortingsWithTranslations example

use ImportTranslationsTrait;

    public function getCreationTimestamp(): int
    {
        return 1595422169;
    }

    public function update(Connection $connection): void
    {
        $this->createTable($connection);
        $this->createTranslationTable($connection);
        $this->createDefaultSortingsWithTranslations($connection);
        $this->setDefaultSystemConfig($connection);
    }

    public function updateDestructive(Connection $connection): void
    {
        // implement update destructive     }

    public function createDefaultSortingsWithTranslations(Connection $connection): void
    {
        foreach ($this->getDefaultSortings() as $sorting) {
            
class Migration1600338271AddTopsellerSorting extends MigrationStep
{
    use ImportTranslationsTrait;

    public function getCreationTimestamp(): int
    {
        return 1600338271;
    }

    public function update(Connection $connection): void
    {
        $this->createDefaultSortingsWithTranslations($connection);
    }

    public function updateDestructive(Connection $connection): void
    {
        // implement update destructive     }

    public function createDefaultSortingsWithTranslations(Connection $connection): void
    {
        $sorting = $this->getTopsellerSorting();

        
Home | Imprint | This part of the site doesn't use cookies.