Installation
Before you can install the plugin you need a packagist token. You get a token once you buy the plugin. If you haven't done so yet, go to sylius-cms.com and hit the big buy button ;)
Installing the plugin
Since the plugin is being provided through packagist.com you just have two steps to take before you can install the plugin:
1. Add repository to composer.json:
composer config repositories.private-packagist composer https://setono.repo.packagist.com/acme/
Remember to replace acme
with the short name given to you.
2. Add token to composer auth:
composer config --global --auth http-basic.setono.repo.packagist.com token your_token
Remember to replace your_token
with the token given to you.
Now you should be able to install the plugin using the normal composer require
command:
composer require setono/sylius-cms-plugin
Enabling the plugin
If you have Flex enabled the composer require
will automatically add the bundles and the plugin to bundles.php
. If not you should manually add them:
// ...
Setono\SyliusCMSPlugin\SetonoSyliusCMSPlugin::class => ['all' => true],
Sylius\Bundle\GridBundle\SyliusGridBundle::class => ['all' => true],
// ...
Add configuration file
Create the file config/packages/setono_sylius_cms.yaml
and add the following:
# config/packages/setono_sylius_cms.yaml
imports:
- { resource: "@SetonoSyliusCMSPlugin/Resources/config/app/config.yaml" }
# Uncomment next line if you want some default fixtures for this plugin
# - { resource: "@SetonoSyliusCMSPlugin/Resources/config/app/fixtures.yaml" }
Include routes configuration
Create the file config/routes/setono_sylius_cms.yaml
and add the following:
# config/routes/setono_sylius_cms.yaml
setono_sylius_cms:
resource: "@SetonoSyliusCMSPlugin/Resources/config/routes.yaml"
Update your database
Run the two following commands to create the tables needed for the CMS plugin:
php bin/console doctrine:migrations:diff
php bin/console doctrine:migrations:migrate
Install assets
php bin/console assets:install
You're good to go!
Last updated