-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Docs] Autocomplete cookbook #231
base: main
Are you sure you want to change the base?
Conversation
9d8220a
to
e5ae645
Compare
e5ae645
to
2580c52
Compare
{% code lineNumbers="true" %} | ||
```php | ||
<?php | ||
// config/routes/ux_autocomplete.php |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// config/routes/ux_autocomplete.php | |
{% code lineNumbers="true" title="config/routes/ux_autocomplete.php" %} | |
```php | |
<?php |
|
||
public static function getType(): string | ||
{ | ||
return self::class; // it will allow to use FQCN instead of a string key. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return self::class; // it will allow to use FQCN instead of a string key. | |
return self::class; // this will allow us to use FQCN instead of a string key. |
We also need to configure the Twig template for our new grid filter. | ||
|
||
```yaml | ||
# config/packages/sylius_grid.yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Place inside a code tag
{% code lineNumbers="true" title="config/packages/sylius_grid.yaml" %}
# config/packages/sylius_grid.yaml | |
{% code lineNumbers="true" title="config/packages/sylius_grid.yaml" %} | |
``yaml |
filter: | ||
'App\Grid\Filter\SpeakerFilter': '@SyliusBootstrapAdminUi/shared/grid/filter/entity.html.twig' | ||
|
||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{% endcode %}
``` | ||
|
||
Now our new grid filtered is configured, we can use it in a grid. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{% code lineNumbers="true" title="src/Grid/TalkGrid.php" %} |
Fixes #230