Last active
December 19, 2015 14:09
-
-
Save Shagshag/5967191 to your computer and use it in GitHub Desktop.
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
<?php | |
class Samdha_IDoSomething() | |
{ | |
private $messager; | |
function __construct() | |
{ | |
// crée le gestionnaire de message | |
$this->messager = new Prestashop_Messager(); | |
} | |
function doSomething() | |
{ | |
if(deleteOrder()) { // fait un truc | |
$this->messager->addMessage('Order deleted', 'success'); // dit qu'il l'a fait | |
if(sendMail()) { // fait autre un truc | |
$this->messager->addMessage('Mail sended', 'success'); // dit qu'il l'a fait | |
} else { // arg ça marche pas | |
$this->messager->addMessage('Can not send mail', 'error'); // dit qu'il y a erreur | |
} | |
} else { // arg ça marche pas | |
$this->messager->addMessage('Can not delete order', 'error'); // dit qu'il y a erreur | |
} | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment