Merge branch 'master' into tax
This commit is contained in:
@@ -37,6 +37,11 @@
|
||||
<default key="_controller">Thelia\Controller\Admin\CustomerController::indexAction</default>
|
||||
</route>
|
||||
|
||||
<route id="admin.customer.update.view" path="/admin/customer/update/{customer_id}">
|
||||
<default key="_controller">Thelia\Controller\Admin\CustomerController::viewAction</default>
|
||||
<requirement key="customer_id">\d+</requirement>
|
||||
</route>
|
||||
|
||||
<!-- end Customer rule management -->
|
||||
|
||||
<!-- Categories management -->
|
||||
|
||||
@@ -25,6 +25,7 @@ namespace Thelia\Controller\Admin;
|
||||
use Symfony\Component\Routing\Exception\InvalidParameterException;
|
||||
use Symfony\Component\Routing\Exception\MissingMandatoryParametersException;
|
||||
use Symfony\Component\Routing\Exception\RouteNotFoundException;
|
||||
use Symfony\Component\Routing\Router;
|
||||
use Thelia\Controller\BaseController;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Thelia\Core\Security\Exception\AuthorizationException;
|
||||
@@ -226,7 +227,7 @@ class BaseAdminController extends BaseController
|
||||
*
|
||||
* @see \Thelia\Controller\BaseController::getRouteFromRouter()
|
||||
*/
|
||||
protected function getRoute($routeId, $parameters = array(), $referenceType = Router::ABSOLUTE_PATH)
|
||||
protected function getRoute($routeId, $parameters = array(), $referenceType = Router::RELATIVE_PATH)
|
||||
{
|
||||
return $this->getRouteFromRouter(
|
||||
'router.admin',
|
||||
|
||||
@@ -35,4 +35,12 @@ class CustomerController extends BaseAdminController
|
||||
if (null !== $response = $this->checkAuth("admin.customers.view")) return $response;
|
||||
return $this->render("customers", array("display_customer" => 20));
|
||||
}
|
||||
}
|
||||
|
||||
public function viewAction($customer_id)
|
||||
{
|
||||
|
||||
return $this->render("customer-edit", array(
|
||||
"customer_id" => $customer_id
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -235,7 +235,7 @@ class BaseController extends ContainerAware
|
||||
* @throws \InvalidArgumentException When the router doesn't exist
|
||||
* @return string The generated URL
|
||||
*/
|
||||
protected function getRouteFromRouter($routerName, $routeId, $parameters = array(), $referenceType = Router::ABSOLUTE_PATH)
|
||||
protected function getRouteFromRouter($routerName, $routeId, $parameters = array(), $referenceType = Router::RELATIVE_PATH)
|
||||
{
|
||||
/** @var Router $router */
|
||||
$router = $this->container->get($routerName);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
@@ -17,7 +17,7 @@
|
||||
/* GNU General Public License for more details. */
|
||||
/* */
|
||||
/* You should have received a copy of the GNU General Public License */
|
||||
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
namespace Thelia\Form;
|
||||
@@ -217,4 +217,4 @@ class CustomerCreation extends BaseForm
|
||||
{
|
||||
return "thelia_customer_creation";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user