<?php declare(strict_types=1);
namespace Maxia\MaxiaListingVariants6;
use Maxia\MaxiaListingVariants6\Setup\Installer;
use Maxia\MaxiaListingVariants6\Setup\Uninstaller;
use Maxia\MaxiaListingVariants6\Setup\Updater;
use Shopware\Core\Framework\Plugin;
use Shopware\Core\Framework\Plugin\Context\InstallContext;
use Shopware\Core\Framework\Plugin\Context\UninstallContext;
use Shopware\Core\Framework\Plugin\Context\UpdateContext;
use Symfony\Component\DependencyInjection\ContainerBuilder;
class MaxiaListingVariants6 extends Plugin
{
public const CUSTOM_FIELD_PREFIX = 'maxia_listing_variants';
public const MAX_ENTRIES_DEFAULT = 4;
public function build(ContainerBuilder $container): void
{
$container->setParameter('maxia.maxia_listing_variants_6.plugin_name', 'MaxiaListingVariants6');
parent::build($container);
}
/**
* {@inheritdoc}
*/
public function update(UpdateContext $updateContext): void
{
parent::update($updateContext);
$updater = new Updater($this->container);
$updater->update($updateContext);
}
/**
* {@inheritdoc}
*/
public function postUpdate(UpdateContext $updateContext): void
{
parent::postUpdate($updateContext);
$updater = new Updater($this->container);
$updater->postUpdate($updateContext);
}
/**
* {@inheritdoc}
*/
public function install(InstallContext $installContext): void
{
parent::install($installContext);
$installer = new Installer($this->container);
$installer->install($installContext);
}
/**
* {@inheritdoc}
*/
public function uninstall(UninstallContext $uninstallContext): void
{
parent::uninstall($uninstallContext);
$uninstaller = new Uninstaller($this->container);
$uninstaller->uninstall($uninstallContext);
}
}