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
Doc about create a custom choices list #516
Conversation
abe04ec
to
654e944
Compare
654e944
to
27ccf99
Compare
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.
The build need to be green :)
|
||
Then configure a fetcher | ||
|
||
.. literalinclude:: ../../src/Acme/Bundle/DummyConnectorBundle/Resources/config/requirejs.yml |
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.
Your YAML file is invalid and create an error in the build
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.
Is this that create an error ? ok thanks :)
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.
Yup, the Python validator for YAML files is "stricter" than Symfony 2 one: note that in Symfony 3 this syntax is also invalid:
foo: %foo% # valid in Symfony2, invalid in Symfony3 and in YAML reference
foo: "%foo%" # valid everywhere
# Resources/config/form_extensions/acme_job_instance_csv_base_import.yml | ||
|
||
acme-job-instance-csv-base-import-show-properties-my-custom-list: | ||
module: %THE_NAME_OF_YOUR_FECTHER% |
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.
- %foo%
+ "%foo%"
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.
Yeah :)
config: | ||
fieldCode: configuration.myCustomList | ||
readOnly: false | ||
label: %your_label_translation_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.
- %foo%
+ "%foo%"
fieldCode: configuration.myCustomList | ||
readOnly: false | ||
label: %your_label_translation_key% | ||
tooltip: %your_tooltip_translation_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.
same here
|
||
config: | ||
paths: | ||
%THE_NAME_OF_YOUR_FECTHER% : %the_path_of_your_fetcher% #For example -> mycustomfetcher: mycustombundle/js/my-custom-choices-list |
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.
same here
config: | ||
pim/fetcher-registry: | ||
fetchers: | ||
%THE_NAME_OF_YOUR_FECTHER% : |
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.
same here
module: pim/base-fetcher | ||
options: | ||
urls: | ||
list: %the_route_name_of_your_controller_action% |
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.
same here
@@ -151,11 +151,12 @@ We need to provide a form name to the frontend to be able to render it properly. | |||
:linenos: | |||
:lines: 1-6 | |||
|
|||
If you want to go further, you can create your own form and re-use common parts provided by default. Here is an example of a full form configuration: | |||
If you want to go further, you can create your own form and re-use common parts provided by default. Here is an example of a full form configuration (config/form_extensions/acme_job_instance_csv_base_import.yml): |
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.
Can you create a link, or put the content?
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.
It's just to tell the path to the user, I don't know how to do that :)
} | ||
} | ||
|
||
Then configure a fetcher |
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.
a fetcher ?
Also:
- a fetcher
+ a fetcher:
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.
Ok :)
551b6b7
to
1e52510
Compare
1e52510
to
5b70f12
Compare
Thank you @anaelChardan 👍 |
Thanks to you @mickaelandrieu :) |
No description provided.