An open API service indexing awesome lists of open source software.

https://github.com/kaliber5/sylius-resource-extension-bundle


https://github.com/kaliber5/sylius-resource-extension-bundle

Last synced: about 2 months ago
JSON representation

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.php

public 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 the

Kaliber5\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: `=, >, >=, <, <=, <>`