rika / sylius-brand-plugin
Brand management plugin for Sylius by Rika
Installs: 36
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:sylius-plugin
Requires
- php: ^8.3
- sylius/sylius: ^2.1
- symfony/framework-bundle: ^7.3
Requires (Dev)
- friends-of-behat/symfony-extension: ^2.0
- phpunit/phpunit: ^10.0
- dev-main
- v1.1.14
- v1.1.13
- v1.1.12
- v1.1.11
- v1.1.10
- v1.1.9
- v1.1.8
- v1.1.7
- v1.1.5
- v1.1.4
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.75
- v1.0.74
- v1.0.73
- v1.0.72
- v1.0.70
- v1.0.69
- v1.0.68
- v1.0.67
- v1.0.66
- v1.0.65
- v1.0.63
- v1.0.62
- v1.0.61
- v1.0.60
- v1.0.59
- v1.0.58
- v1.0.57
- v1.0.56
- v1.0.55
- v1.0.54
- v1.0.53
- v1.0.52
- v1.0.51
- v1.0.50
- v1.0.49
- v1.0.48
- v1.0.47
- v1.0.46
- v1.0.45
- v1.0.44
- v1.0.43
- v1.0.42
- v1.0.41
- v1.0.40
- v1.0.39
- v1.0.38
- v1.0.37
- v1.0.36
- v1.0.35
- v1.0.34
- v1.0.33
- v1.0.32
- v1.0.31
- v1.0.30
- v1.0.29
- v1.0.28
- v1.0.27
- v1.0.24
- v1.0.22
- v1.0.21
- v1.0.20
- v1.0.19
- v1.0.18
- v1.0.17
- v1.0.16
- v1.0.15
- v1.0.14
- v1.0.13
- v1.0.12
- v1.0.11
- v1.0.10
- v1.0.9
- v1.0.8
- v1.0.7
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- dev-version-1.1.0
This package is auto-updated.
Last update: 2025-09-02 17:00:43 UTC
README
Plugin de gestion des marques pour Sylius 2.1
Installation
1. Installer via Composer
composer require rika/sylius-brand-plugin
2. Activer le plugin
// config/bundles.php return [ // ... Rika\SyliusBrandPlugin\RikaSyliusBrandPlugin::class => ['all' => true], ];
3. Importer la configuration
# config/packages/rika_sylius_brand.yaml imports: - { resource: "@RikaSyliusBrandPlugin/Resources/config/services.yaml" } - { resource: "@RikaSyliusBrandPlugin/Resources/config/sylius_resource.yaml" } - { resource: "@RikaSyliusBrandPlugin/Resources/config/grids/*.yaml" }
4. Importer les routes
# config/routes/rika_sylius_brand.yaml rika_sylius_brand_admin: resource: "@RikaSyliusBrandPlugin/Resources/config/routing/admin.yaml" prefix: /admin rika_sylius_brand_shop: resource: "@RikaSyliusBrandPlugin/Resources/config/routing/shop.yaml" prefix: /{_locale} requirements: _locale: ^[a-z]{2}(?:_[A-Z]{2})?$
5. Étendre l'entité Product
<?php // src/Entity/Product/Product.php namespace App\Entity\Product; use Doctrine\ORM\Mapping as ORM; use Rika\SyliusBrandPlugin\Entity\ProductBrandAwareInterface; use Rika\SyliusBrandPlugin\Entity\ProductBrandAwareTrait; use Sylius\Component\Core\Model\Product as BaseProduct; #[ORM\Entity] #[ORM\Table(name: 'sylius_product')] class Product extends BaseProduct implements ProductBrandAwareInterface { use ProductBrandAwareTrait; }
6. Configurer Sylius
# config/packages/_sylius.yaml sylius_product: resources: product: classes: model: App\Entity\Product\Product
7. Mettre à jour la base de données
php bin/console doctrine:migrations:diff php bin/console doctrine:migrations:migrate
8. Vider le cache
php bin/console cache:clear
Utilisation
- Accès administration :
/admin/brands
- Pages publiques :
/brands
et/brands/{slug}
Hooks disponibles
rika_sylius_brand.hook.brand_pre_create
rika_sylius_brand.hook.brand_post_create
rika_sylius_brand.hook.brand_pre_update
rika_sylius_brand.hook.brand_post_update
Licence
MIT
Auteur
Rika - https://github.com/rika