Advertising bundle
This version of the bundle requires Symfony Flex (>= 4.0) and PHP 7. You want to use Doctrine ORM and MySQL., (*1)
Require the bundle with composer:, (*2)
$ composer require octopouce-mu/advertising-bundle
For working the bundle, there needing OctopouceAdminBundle. Install dependencies bundles and configure., (*3)
OctopouceAdminBundle, (*4)
For ORM run the following command., (*5)
$ php bin/console doctrine:schema:update --force
Caution, (*6)
If error "1071 Specified key was too long; max key length is 767 bytes", you change configs doctrine :, (*7)
# config/packages/doctrine.yaml doctrine: dbal: charset: utf8 default_table_options: charset: utf8 collate: utf8_unicode_ci
Now that you have activated and configured the bundle, all that is left to do is import the OctopouceAdvertisingBundle routing files if Symfony Flex hasn't already imported the file., (*8)
# config/routes/octopouce_advertising.yaml _octopouce_advertising: resource: "@OctopouceAdvertisingBundle/Resources/config/routing/routing.yaml"
$ php bin/console assets:install --symlink
# config/packages/security.yaml security: role_hierarchy: ROLE_ADVERT: ROLE_USER ROLE_ADMIN: [ROLE_ADVERT] ROLE_SUPER_ADMIN: ROLE_ADMIN
Array Twig Exemple :, (*9)
{{ adzone("Exemple") }}
HTML Exemple :, (*10)
{{ adzone("Exemple", true)|raw }}
You can to add bundles with OctopouceAdminBundle :, (*11)