Exemplo n.º 1
0
 public function deleteAction($entityId)
 {
     $query = CustomerQuery::create()->joinOrder()->filterById($entityId)->findOne();
     if (null !== $query) {
         throw new HttpException(403, json_encode(["error" => sprintf("You can't delete the customer %d as he has orders", $entityId)]));
     }
     return parent::deleteAction($entityId);
 }
Exemplo n.º 2
0
 public function __construct()
 {
     parent::__construct("lang", AdminResources::LANGUAGE, [], [], []);
 }
Exemplo n.º 3
0
 public function __construct()
 {
     parent::__construct("tax rule", AdminResources::TAX, [TheliaEvents::TAX_RULE_CREATE, TheliaEvents::TAX_RULE_TAXES_UPDATE], [TheliaEvents::TAX_RULE_UPDATE, TheliaEvents::TAX_RULE_TAXES_UPDATE], TheliaEvents::TAX_RULE_DELETE);
 }
Exemplo n.º 4
0
 public function __construct()
 {
     parent::__construct("category", AdminResources::CATEGORY, TheliaEvents::CATEGORY_CREATE, TheliaEvents::CATEGORY_UPDATE, TheliaEvents::CATEGORY_DELETE);
 }
Exemplo n.º 5
0
 public function __construct()
 {
     parent::__construct("customer title", AdminResources::TITLE, [TheliaEvents::CUSTOMER_TITLE_BEFORE_CREATE, TheliaEvents::CUSTOMER_TITLE_CREATE, TheliaEvents::CUSTOMER_TITLE_AFTER_CREATE], [TheliaEvents::CUSTOMER_TITLE_BEFORE_UPDATE, TheliaEvents::CUSTOMER_TITLE_UPDATE, TheliaEvents::CUSTOMER_TITLE_AFTER_UPDATE], TheliaEvents::CUSTOMER_TITLE_DELETE);
 }
Exemplo n.º 6
0
 public function __construct()
 {
     parent::__construct("brand", AdminResources::BRAND, [], [], []);
 }
Exemplo n.º 7
0
 public function __construct()
 {
     parent::__construct("tax", AdminResources::TAX, [], [], []);
 }
Exemplo n.º 8
0
 public function __construct()
 {
     parent::__construct("currency", AdminResources::CURRENCY, [], [], []);
 }
Exemplo n.º 9
0
 public function __construct()
 {
     parent::__construct("attribute av", AdminResources::ATTRIBUTE, [], [], []);
 }
Exemplo n.º 10
0
 public function __construct()
 {
     parent::__construct("country", AdminResources::COUNTRY, [], [], []);
 }