add some phpdoc
This commit is contained in:
@@ -62,7 +62,7 @@ class CartController extends BaseFrontController
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($message) {
|
if ($message) {
|
||||||
$cartAdd->setErrorMessage($e->getMessage());
|
$cartAdd->setErrorMessage($message);
|
||||||
$this->getParserContext()->setErrorForm($cartAdd);
|
$this->getParserContext()->setErrorForm($cartAdd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,6 +33,11 @@ use Thelia\Core\Event\TheliaEvents;
|
|||||||
|
|
||||||
class CustomerController extends BaseFrontController
|
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()
|
public function createAction()
|
||||||
{
|
{
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
@@ -66,10 +71,14 @@ class CustomerController extends BaseFrontController
|
|||||||
|
|
||||||
$this->processLogin($customerCreateEvent->getCustomer());
|
$this->processLogin($customerCreateEvent->getCustomer());
|
||||||
|
|
||||||
|
$this->redirectSuccess();
|
||||||
|
|
||||||
} catch (FormValidationException $e) {
|
} catch (FormValidationException $e) {
|
||||||
|
$customerCreation->setErrorMessage($e->getMessage());
|
||||||
|
$this->getParserContext()->setErrorForm($customerCreation);
|
||||||
} catch (PropelException $e) {
|
} 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());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user