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

Add form handler for Translations settings forms #10165

Merged
merged 3 commits into from Aug 28, 2018

Conversation

Projects
None yet
4 participants
@rokaszygmantas
Contributor

rokaszygmantas commented Aug 28, 2018

Questions Answers
Branch? develop
Description? This PR adds a form handler for translations forms, enabling form-related hooks
Type? bug fix
Category? BO
BC breaks? no
Deprecations? no
Fixed ticket? no
How to test? Install a demo module: (https://github.com/rokaszygmantas/hooktest). After installation in the Improve -> International -> Translations page you should see new form fields in every form. Expected view: https://prnt.sc/knp97w

All fieldsets should have this new "Test field" which is coming from the module, meaning the form hook is working.


This change is Reviewable

$this->hookDispatcher->dispatchWithParameters(
"action{$this->hookName}Form",
[
'form_builder' => $this->formBuilder,

This comment has been minimized.

@rokaszygmantas

rokaszygmantas Aug 28, 2018

Contributor

btw @mickaelandrieu this proves the point that you wanted to test, that passing hook params by reference is not needed when they are objects :)

@rokaszygmantas

rokaszygmantas Aug 28, 2018

Contributor

btw @mickaelandrieu this proves the point that you wanted to test, that passing hook params by reference is not needed when they are objects :)

This comment has been minimized.

@mickaelandrieu

mickaelandrieu Aug 28, 2018

Contributor

ok 👍 good to know, I'll clean the others object calls

edit: you only have to use ./vendor/bin/php-cs-fixer fix and push your commit to fix the build: we now check our coding styles :)

@mickaelandrieu

mickaelandrieu Aug 28, 2018

Contributor

ok 👍 good to know, I'll clean the others object calls

edit: you only have to use ./vendor/bin/php-cs-fixer fix and push your commit to fix the build: we now check our coding styles :)

This comment has been minimized.

@rokaszygmantas

rokaszygmantas Aug 28, 2018

Contributor

will do the cs fix :)

@rokaszygmantas

rokaszygmantas Aug 28, 2018

Contributor

will do the cs fix :)

This comment has been minimized.

@rokaszygmantas

rokaszygmantas Aug 28, 2018

Contributor

fixed

@rokaszygmantas

rokaszygmantas Aug 28, 2018

Contributor

fixed

@mickaelandrieu

This comment has been minimized.

Show comment
Hide comment
@mickaelandrieu

mickaelandrieu Aug 28, 2018

Contributor

Thanks @rokaszygmantas, it's my contribution now :p:

ping @PierreRambaud any idea why unit tests on PositionController may be broken by this contribution?

Contributor

mickaelandrieu commented Aug 28, 2018

Thanks @rokaszygmantas, it's my contribution now :p:

ping @PierreRambaud any idea why unit tests on PositionController may be broken by this contribution?

@PierreRambaud

This comment has been minimized.

Show comment
Hide comment
@PierreRambaud

PierreRambaud Aug 28, 2018

Contributor

@mickaelandrieu Tss, it's ok now :)

Contributor

PierreRambaud commented Aug 28, 2018

@mickaelandrieu Tss, it's ok now :)

@mickaelandrieu mickaelandrieu merged commit 9525f75 into PrestaShop:develop Aug 28, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@mickaelandrieu

This comment has been minimized.

Show comment
Hide comment
@mickaelandrieu
Contributor

mickaelandrieu commented Aug 28, 2018

@mickaelandrieu mickaelandrieu added this to the 1.7.5.0 milestone Aug 28, 2018

@rokaszygmantas rokaszygmantas deleted the rokaszygmantas:translations_form_handler branch Aug 28, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment