add some phpdoc

This commit is contained in:
Manuel Raynaud
2013-08-16 11:08:48 +02:00
parent 382fbe230e
commit bc57e884ad
2 changed files with 12 additions and 3 deletions

View File

@@ -62,7 +62,7 @@ class CartController extends BaseFrontController
}
if ($message) {
$cartAdd->setErrorMessage($e->getMessage());
$cartAdd->setErrorMessage($message);
$this->getParserContext()->setErrorForm($cartAdd);
}
}

View File

@@ -33,6 +33,11 @@ use Thelia\Core\Event\TheliaEvents;
class CustomerController extends BaseFrontController
{
/**
* create a new Customer. Retrieve data in form and dispatch a action.createCustomer event
*
* if error occurs, message is set in the parserContext
*/
public function createAction()
{
$request = $this->getRequest();
@@ -66,10 +71,14 @@ class CustomerController extends BaseFrontController
$this->processLogin($customerCreateEvent->getCustomer());
$this->redirectSuccess();
} catch (FormValidationException $e) {
$customerCreation->setErrorMessage($e->getMessage());
$this->getParserContext()->setErrorForm($customerCreation);
} catch (PropelException $e) {
\Thelia\Log\Tlog::getInstance()->error(sprintf("error during customer creation process in front context with message : %s", $e->getMessage()));
$this->getParserContext()->setGeneralError($e->getMessage());
}