Upgrade the CmsBlockGui module
Edit on GitHubUpgrading from version 1.* to version 2.*
This version adds support to manage CMS Block-store relation through the dedicated CMS Block Back Office.
-
Install/update
spryker/cms-block
to at least version 2.0.0. For more information, see Upgrade the CmsBlock module. -
Upgrade
spryker/cms-block-gui
to at least version 2.0.0. -
The CMS Block Back Office expects the CMS Block-store relation handling partial form to be defined in the dependency provider using the
Spryker\Zed\Kernel\Communication\Form\FormTypeInterface
. You can use the single store and multi-store compatible default implementationSpryker\Zed\Store\Communication\Form\Type\StoreRelationToggleType
wrapped inSpryker\Zed\Store\Communication\Plugin\Form\StoreRelationToggleFormTypePlugin
. Note:Spryker\Zed\Store\Communication\Plugin\Form\StoreRelationToggleFormTypePlugin
is introduced inspryker/store
version 1.2.0.
Example injection:
<?php
namespace Pyz\Zed\CmsBlockGui;
use Spryker\Zed\CmsBlockGui\CmsBlockGuiDependencyProvider as CmsBlockGuiCmsBlockGuiDependencyProvider;
use Spryker\Zed\Store\Communication\Plugin\Form\StoreRelationToggleFormTypePlugin;
class CmsBlockGuiDependencyProvider extends CmsBlockGuiCmsBlockGuiDependencyProvider
{
/**
* @return \Spryker\Zed\Kernel\Communication\Form\FormTypeInterface
*/
protected function createStoreRelationFormTypePlugin()
{
return new StoreRelationToggleFormTypePlugin();
}
}
- The following deprecated methods have been removed:
CmsBlockGuiCommunicationFactory::createCmsBlockForm()
CmsBlockGuiCommunicationFactory::createCmsBlockGlossaryForm()
CmsBlockGuiCommunicationFactory::createCmsBlockGlossaryPlaceholderTranslationFormType()
CmsBlockGuiCommunicationFactory::createCmsBlockGlossaryPlaceholderFormType()
CmsBlockForm::getName()
CmsBlockGlossaryForm::getName()
CmsBlockGlossaryPlaceholderForm::getName()
- Additionally these internal classes have changed. Take a look if you have customized any of them:
CmsBlockForm
CmsBlockTable
ViewBlockController
ViewBlock/index.twig
You can find more details for these changes on the CMS Block GUI module release page.
- In the Back Office, go to Content > Blocks.
- Next to any CMS block, select Edit Block. You should see the Store relation field with the list of available stores.
Thank you!
For submitting the form