<?php declare(strict_types=1);
namespace CrayssnLabsOpenAIContentCreator;
use Shopware\Core\Framework\Plugin;
use Shopware\Core\Framework\Plugin\Context\InstallContext;
use Shopware\Core\Framework\Plugin\Context\UninstallContext;
use CrayssnLabsOpenAIContentCreator\Framework\Lifecycle;
use Shopware\Core\Framework\Plugin\Context\UpdateContext;
/**
* Class CrayssnLabsOpenAIContentCreator
*
* @package CrayssnLabsOpenAIContentCreator
*
* @author Sebastian Ludwig <dev@cl.team>
* @copyright Copyright (c) 2023, CrayssnLabs Ludwig Wiegler GbR
*/
class CrayssnLabsOpenAIContentCreator extends Plugin
{
const CUSTOM_FIELD_SET_NAME = 'CrayssnLabsOpenAIContentCreator_editor_configuration';
const CUSTOM_FIELD_TOPIC = 'CrayssnLabsOpenAIContentCreator_editor_configuration_topic';
const CUSTOM_FIELD_KEYWORDS = 'CrayssnLabsOpenAIContentCreator_editor_configuration_keywords';
const CUSTOM_FIELD_WORD_COUNT = 'CrayssnLabsOpenAIContentCreator_editor_configuration_word_count';
const CUSTOM_FIELD_HEADLINE1_TAG = 'CrayssnLabsOpenAIContentCreator_editor_configuration_headline1_tag';
const CUSTOM_FIELD_HEADLINE2_TAG = 'CrayssnLabsOpenAIContentCreator_editor_configuration_headline2_tag';
const CUSTOM_FIELD_KEYWORD_TAG = 'CrayssnLabsOpenAIContentCreator_editor_configuration_keyword_tag';
const CONFIG_PROMPT_PATTERN_SEO_TITLE = 'CrayssnLabsOpenAIContentCreator.config.promptPatternSeoTitle';
const CONFIG_PROMPT_PATTERN_SEO_DESCRIPTION = 'CrayssnLabsOpenAIContentCreator.config.promptPatternSeoDescription';
/**
* Function install
*
* @param \Shopware\Core\Framework\Plugin\Context\InstallContext $installContext
*/
public function install(InstallContext $installContext): void
{
(new Lifecycle\Install($this->container, $installContext->getContext()))->run();
parent::install($installContext);
}
/**
* Function uninstall
*
* @param \Shopware\Core\Framework\Plugin\Context\UninstallContext $uninstallContext
*/
public function uninstall(UninstallContext $uninstallContext): void
{
(new Lifecycle\Uninstall($this->container, $uninstallContext->getContext()))->run();
parent::uninstall($uninstallContext);
}
/**
* Function update
*
* @param \Shopware\Core\Framework\Plugin\Context\UpdateContext $updateContext
*/
public function update(UpdateContext $updateContext): void
{
(new Lifecycle\Update($this->container, $updateContext->getContext()))->run();
parent::update($updateContext);
}
}