-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from matks/split-module-2
Rewrite demoextendsymfonyform1 module without CQRS
- Loading branch information
Showing
19 changed files
with
172 additions
and
585 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,22 @@ | ||
{ | ||
"name": "prestashop/democqrshooksusage", | ||
"description": "Help developers to understand how to create module using new hooks and apply best practices when using CQRS", | ||
"name": "prestashop/demoextendsymfonyform1", | ||
"authors": [ | ||
{ | ||
"name": "Tomas Ilginis" | ||
}, | ||
{ | ||
"name": "PrestaShop Core Team" | ||
} | ||
], | ||
"description": "Help developers to understand how to create module using Symfony hooks", | ||
"autoload": { | ||
"psr-4": { | ||
"DemoCQRSHooksUsage\\": "src/" | ||
"PrestaShop\\Module\\DemoHowToExtendSymfonyForm\\": "src/" | ||
} | ||
}, | ||
"license": "MIT", | ||
"type": "prestashop-module" | ||
"type": "prestashop-module", | ||
"config": { | ||
"prepend-autoloader": false | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
# @see https://devdocs.prestashop.com/1.7/modules/concepts/controllers/admin-controllers/#how-to-map-an-action-of-your-controller-to-a-uri | ||
ps_democqrshooksusage_toggle_is_allowed_for_review: | ||
path: demo-cqrs-hook-usage/{customerId}/toggle-is-allowed-for-review | ||
ps_demoextendsymfonyform_toggle_is_allowed_for_review: | ||
path: ps_demoextendsymfonyform/{customerId}/toggle-is-allowed-for-review | ||
methods: [POST] | ||
defaults: | ||
_controller: 'DemoCQRSHooksUsage\Controller\Admin\CustomerReviewController::toggleIsAllowedForReviewAction' | ||
_controller: 'PrestaShop\Module\DemoHowToExtendSymfonyForm\Controller\Admin\CustomerReviewController::toggleIsAllowedForReviewAction' | ||
requirements: | ||
customerId: \d+ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,8 @@ | ||
services: | ||
_defaults: | ||
public: true | ||
# @see https://devdocs.prestashop.com/1.7/development/architecture/migration-guide/forms/cqrs-usage-in-forms/ for CQRS pattern usage examples. | ||
democqrshooksusage.domain.reviewer.command_handler.toggle_is_allowed_to_review_handler: | ||
class: 'DemoCQRSHooksUsage\Domain\Reviewer\CommandHandler\ToggleIsAllowedToReviewHandler' | ||
arguments: | ||
- '@democqrshooksusage.repository.reviewer' | ||
tags: | ||
- name: tactician.handler | ||
command: 'DemoCQRSHooksUsage\Domain\Reviewer\Command\ToggleIsAllowedToReviewCommand' | ||
|
||
democqrshooksusage.domain.reviewer.query_handler.get_reviewer_settings_for_form_handler: | ||
class: 'DemoCQRSHooksUsage\Domain\Reviewer\QueryHandler\GetReviewerSettingsForFormHandler' | ||
arguments: | ||
- '@democqrshooksusage.repository.reviewer' | ||
tags: | ||
- name: tactician.handler | ||
command: 'DemoCQRSHooksUsage\Domain\Reviewer\Query\GetReviewerSettingsForForm' | ||
|
||
democqrshooksusage.domain.reviewer.command_handler.update_is_allowed_to_review_handler: | ||
class: 'DemoCQRSHooksUsage\Domain\Reviewer\CommandHandler\UpdateIsAllowedToReviewHandler' | ||
arguments: | ||
- '@democqrshooksusage.repository.reviewer' | ||
tags: | ||
- name: tactician.handler | ||
command: 'DemoCQRSHooksUsage\Domain\Reviewer\Command\UpdateIsAllowedToReviewCommand' | ||
|
||
democqrshooksusage.repository.reviewer: | ||
class: 'DemoCQRSHooksUsage\Repository\ReviewerRepository' | ||
ps_demoextendsymfonyform.repository.reviewer: | ||
class: 'PrestaShop\Module\DemoHowToExtendSymfonyForm\Repository\ReviewerRepository' | ||
arguments: | ||
- '@doctrine.dbal.default_connection' | ||
- '%database_prefix%' |
This file contains 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
Oops, something went wrong.