<?php declare(strict_types=1);
/**
* LeopardSearchExtension
* Copyright (c) Die Leoparden GmbH
*/
namespace LeopardSearchExtension;
use LeopardSearchExtension\Util\Lifecycle\InstallUninstall;
use LeopardSearchExtension\Util\Lifecycle\Update;
use Shopware\Core\Framework\Plugin;
use Shopware\Core\Framework\Plugin\Context\InstallContext;
use Shopware\Core\Framework\Plugin\Context\UpdateContext;
use Shopware\Core\System\SystemConfig\SystemConfigService;
/**
* Class LeopardSearchExtension
*/
class LeopardSearchExtension extends Plugin
{
/**
* @param InstallContext $installContext
* @return void
*/
public function postInstall(InstallContext $installContext): void
{
(new InstallUninstall(
$this->getSystemConfigService()
))->postInstall();
}
/**
* @param UpdateContext $updateContext
* @return void
*/
public function postUpdate(UpdateContext $updateContext): void
{
(new Update(
$this->getSystemConfigService()
))->postUpdate();
}
/**
* @return SystemConfigService
*/
protected function getSystemConfigService(): SystemConfigService
{
return $this->container->get('Shopware\Core\System\SystemConfig\SystemConfigService');
}
}