https://github.com/kaliber5/sylius-resource-extension-bundle
https://github.com/kaliber5/sylius-resource-extension-bundle
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/kaliber5/sylius-resource-extension-bundle
- Owner: kaliber5
- Created: 2021-02-09T20:55:19.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-02-09T20:55:32.000Z (about 4 years ago)
- Last Synced: 2025-01-14T14:59:26.283Z (3 months ago)
- Language: PHP
- Size: 20.5 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Kaliber5SyliusResourceExtensionBundle
=====================================SonataAdmin
-----------This Bundle replaces the ModelManager from the "sonata-project/doctrine-orm-admin-bundle". So you have register this bundle AFTER the SonataAdminBundle in
your AppKernel.phppublic function registerBundles()
{
$bundles = array(
...
new Sonata\AdminBundle\SonataAdminBundle(),
...
new Kaliber5\SyliusResourceExtensionBundle\Kaliber5SyliusResourceExtensionBundle(),
...
);
...
}
If your entity implements the
Sylius\Component\Translation\Model\TranslatableInterface
you should use theKaliber5\SyliusResourceExtensionBundle\SonataAdmin\TranslatableAdminTrait
in your Admin class to inject a default- and fallbackLocale on new created objects.":18, "<=":40}
### The Json object
For numeric values:
```json
{">":50, "<=":100}
```
This will result in the following query expression: `key > 50 AND key <= 100`For discrete values:
```json
{"=":["excellent", "good"]}
```
or:
```json
{"<>":["excellent", "good"]}
```
This will result in the following query expression: `key IN ("excellent", "good")`
respectively `key NOT IN ("excellent", "good")`By default, the criterias will be joined with an "AND" condition, to use an
"OR" condition, use:
```json
{"or":{"<":50, ">=":100}}
```This will result in the following query expression: `key < 50 OR key >= 100`
Allowed comparison operators: `=, >, >=, <, <=, <>`