setono / sylius-bulk-edit-plugin
Setono example plugin for Sylius.
Fund package maintenance!
Setono
Installs: 16 013
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 3
Forks: 2
Open Issues: 1
Type:symfony-bundle
Requires
- php: >=7.4
- doctrine/orm: ^2.7
- sylius/channel: ^1.0
- sylius/core: ^1.0
- sylius/core-bundle: ^1.0
- sylius/resource-bundle: ^1.6
- sylius/taxonomy-bundle: ^1.0
- symfony/config: ^5.4 || ^6.0
- symfony/dependency-injection: ^5.4 || ^6.0
- symfony/form: ^5.4 || ^6.0
- symfony/http-foundation: ^5.4 || ^6.0
- symfony/http-kernel: ^5.4 || ^6.0
- symfony/routing: ^5.4 || ^6.0
- twig/twig: ^2.0 || ^3.0
- webmozart/assert: ^1.9
Requires (Dev)
- api-platform/core: ^2.5
- lexik/jwt-authentication-bundle: ^2.8
- php-http/message-factory: ^1.1
- phpunit/phpunit: ^9.6
- psalm/plugin-phpunit: ^0.18
- setono/code-quality-pack: ^2.4
- sylius/sylius: ~1.10.14
- symfony/debug-bundle: ^5.4 || ^6.0
- symfony/dotenv: ^5.4 || ^6.0
- symfony/intl: ^5.4 || ^6.0
- symfony/maker-bundle: ^1.15
- symfony/property-info: ^5.4 || ^6.0
- symfony/serializer: ^5.4 || ^6.0
- symfony/web-profiler-bundle: ^5.4 || ^6.0
- symfony/webpack-encore-bundle: ^1.17.1
This package is auto-updated.
Last update: 2024-11-18 16:51:55 UTC
README
This plugin is a proof of concept of something great to be.
Installation
Download
$ composer require setono/sylius-bulk-edit-plugin
Import configuration
# config/packages/setono_sylius_bulk_edit.yaml imports: # ... - { resource: "@SetonoSyliusBulkEditPlugin/Resources/config/app/config.yaml" }
Import routes
# config/routes/setono_sylius_bulk_edit.yaml setono_sylius_bulk_edit: resource: "@SetonoSyliusBulkEditPlugin/Resources/config/routes.yaml"
or if your app doesn't use locales:
# config/routes.yaml setono_sylius_bulk_edit: resource: "@SetonoSyliusBulkEditPlugin/Resources/config/routes_no_locale.yaml"
Add plugin class to your bundles.php
:
<?php $bundles = [ // ... Setono\SyliusBulkEditPlugin\SetonoSyliusBulkEditPlugin::class => ['all' => true], // ... ];
Extend resource classes
Extend ProductRepository
<?php # src/Doctrine/ORM/ProductRepository.php declare(strict_types=1); namespace App\Doctrine\ORM; use Setono\SyliusBulkEditPlugin\Doctrine\ORM\ProductRepositoryTrait; use Setono\SyliusBulkEditPlugin\Repository\ProductRepositoryInterface; use Sylius\Bundle\CoreBundle\Doctrine\ORM\ProductRepository as BaseProductRepository; class ProductRepository extends BaseProductRepository implements ProductRepositoryInterface { use ProductRepositoryTrait; }
Add configuration
# config/packages/_sylius.yaml sylius_product: resources: product: classes: repository: App\Doctrine\ORM\ProductRepository
Done!
Go to /admin/products
, select a few products and click the Edit
button.