Practical Module Development for Prestashop 8 by Louis AUTHIE
Author:Louis AUTHIE
Language: eng
Format: epub
Publisher: Packt
Published: 2023-05-15T00:00:00+00:00
Creating the deletion command
As we saw in Chapter 4, The Back Office, our delete Command represents the deletion task and the required elements to make it. We will create the corresponding CommandHandler to execute the deletion task.
Following DDD practices, we need to create the /modules/whcallback/src/Domain/WHCallbackRequest/ folder, which will contain all the business objects linked to our WHCallbackRequest entity.
The DeleteWHCallbackRequestCommand class will be our deletion command and we will store it in the /modules/whcallback/src/Domain/WHCallbackRequest/Command/DeleteWHCallbackRequestCommand.php file. Letâs define it by following this simple code:
<?php namespace WebHelpers\WHCallback\Domain\WHCallbackRequest\Command; class DeleteWHCallbackRequestCommand { private $idRequest; public function __construct(int $idRequest) { $this->idRequest = $idRequest; } public function getIdRequest() { return $this->idRequest; } }
This Command requires the $idRequest integer representing the id_request of the callback request row to delete in the database. We create the corresponding getter to make it available to CommandHandler.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Deep Learning with Python by François Chollet(14629)
The Mikado Method by Ola Ellnestam Daniel Brolund(11889)
Hello! Python by Anthony Briggs(11804)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(11249)
Dependency Injection in .NET by Mark Seemann(11009)
A Developer's Guide to Building Resilient Cloud Applications with Azure by Hamida Rebai Trabelsi(10523)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(9844)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(9432)
Grails in Action by Glen Smith Peter Ledbrook(9175)
Hit Refresh by Satya Nadella(9038)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(8817)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(8607)
The Kubernetes Operator Framework Book by Michael Dame(8471)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(8313)
Exploring Deepfakes by Bryan Lyon and Matt Tora(8292)
Robo-Advisor with Python by Aki Ranin(8245)
Practical Computer Architecture with Python and ARM by Alan Clements(8218)
Implementing Enterprise Observability for Success by Manisha Agrawal and Karun Krishnannair(8189)
Building Low Latency Applications with C++ by Sourav Ghosh(8094)