Open
Conversation
ryo-endo
suggested changes
Jul 10, 2018
PluginManager.php
Outdated
| * @return void | ||
| */ | ||
| public function enable($config, $app) | ||
| public function enable($config = [], Application $app = null, ContainerInterface $container = null) |
ryo-endo
suggested changes
Jul 10, 2018
chihiro-adachi
suggested changes
Jul 10, 2018
EventSubscriber.php
Outdated
| */ | ||
| public function onFormPreSubmit(FormEvent $event) | ||
| { | ||
| /** @var Category $Category */ |
There was a problem hiding this comment.
Formへのマッピングはもう不要なはずなので、このEventSubscriber自体不要なはずです。
| 'maxlength' => $this->eccubeConfig['category_text_area_len'], | ||
| 'placeholder' => $this->translator->trans('admin.plugin.category.content'), | ||
| ], | ||
| ])->addEventSubscriber(new EventSubscriber()); |
There was a problem hiding this comment.
Hi @chihiro-adachi the reason I use event is:
- I append
contentinput intoCategoryTypebyCategoryTypeExtension. contentinput was not render on form (new category form & edit-inline category form)- Then when submit form (new category or edit-inline category), the POST does not contains key:value of
content - It make value of
contentinput always be null (see\Symfony\Component\Form\Form::submit( line 572))
Resource/config/services.yml
Outdated
| @@ -0,0 +1,2 @@ | |||
| parameters: | |||
| category_text_area_len: 4000 No newline at end of file | |||
There was a problem hiding this comment.
命名規約に合わせてください。
category_content_text_area_len
Resource/locale/messages.ja.php
Outdated
| @@ -0,0 +1,7 @@ | |||
| <?php | |||
| return [ | |||
| 'admin.plugin.category.content' => 'コンテンツを入力してください(HTMLタグ使用可)', | |||
There was a problem hiding this comment.
命名規約にあわせてください
EC-CUBE/sample-payment-plugin#6
config.yml
Outdated
| orm.path: | ||
| - /Resource/doctrine | ||
| event: Event | ||
| event: EventSubscriber |
Contributor
Author
|
for fixing |
Contributor
Author
|
finish fixing |
|
@chihiro-adachi @ryo-endo 再レビューお願いします。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要(Overview・Refs Issue)
方針(Policy)
- Change some logic business.
実装に関する補足(Appendix)