1 | <?php |
||
24 | class CustomerController extends Controller |
||
25 | { |
||
26 | /** |
||
27 | * @Route("/", name="orocrm_magento_customer_index") |
||
28 | * @AclAncestor("orocrm_magento_customer_view") |
||
29 | * @Template |
||
30 | */ |
||
31 | public function indexAction() |
||
37 | |||
38 | /** |
||
39 | * @param Customer $customer |
||
40 | * @return array |
||
41 | * |
||
42 | * @Route("/view/{id}", name="orocrm_magento_customer_view", requirements={"id"="\d+"})) |
||
43 | * @Acl( |
||
44 | * id="orocrm_magento_customer_view", |
||
45 | * type="entity", |
||
46 | * permission="VIEW", |
||
47 | * class="OroCRMMagentoBundle:Customer" |
||
48 | * ) |
||
49 | * @Template |
||
50 | */ |
||
51 | public function viewAction(Customer $customer) |
||
55 | |||
56 | /** |
||
57 | * @param Customer $customer |
||
58 | * @return array |
||
59 | * |
||
60 | * @Route("/update/{id}", name="orocrm_magento_customer_update", requirements={"id"="\d+"})) |
||
61 | * @Acl( |
||
62 | * id="orocrm_magento_customer_update", |
||
63 | * type="entity", |
||
64 | * permission="EDIT", |
||
65 | * class="OroCRMMagentoBundle:Customer" |
||
66 | * ) |
||
67 | * @Template("OroCRMMagentoBundle:Customer:update.html.twig") |
||
68 | */ |
||
69 | public function updateAction(Customer $customer) |
||
73 | |||
74 | /** |
||
75 | * @Route("/create", name="orocrm_magento_customer_create")) |
||
76 | * @Acl( |
||
77 | * id="orocrm_magento_customer_create", |
||
78 | * type="entity", |
||
79 | * permission="CREATE", |
||
80 | * class="OroCRMMagentoBundle:Customer" |
||
81 | * ) |
||
82 | * @Template("OroCRMMagentoBundle:Customer:update.html.twig") |
||
83 | */ |
||
84 | public function createAction() |
||
92 | |||
93 | /** |
||
94 | * @param Customer $customer |
||
95 | * @return JsonResponse |
||
96 | * |
||
97 | * @Route("/register/{id}", name="orocrm_magento_customer_register", requirements={"id"="\d+"})) |
||
98 | * @AclAncestor("orocrm_magento_customer_update") |
||
99 | */ |
||
100 | public function registerAction(Customer $customer) |
||
106 | |||
107 | /** |
||
108 | * @param Customer $customer |
||
109 | * @return array |
||
110 | */ |
||
111 | protected function update(Customer $customer) |
||
131 | |||
132 | /** |
||
133 | * @param Customer $customer |
||
134 | * @return array |
||
135 | * |
||
136 | * @Route("/info/{id}", name="orocrm_magento_customer_info", requirements={"id"="\d+"})) |
||
137 | * @AclAncestor("orocrm_magento_customer_view") |
||
138 | * @Template |
||
139 | */ |
||
140 | public function infoAction(Customer $customer) |
||
144 | |||
145 | /** |
||
146 | * @param Account $account |
||
147 | * @param Channel $channel |
||
148 | * @return array |
||
149 | * |
||
150 | * @Route( |
||
151 | * "/widget/customers-info/{accountId}/{channelId}", |
||
152 | * name="orocrm_magento_widget_account_customers_info", |
||
153 | * requirements={"accountId"="\d+", "channelId"="\d+"} |
||
154 | * ) |
||
155 | * @ParamConverter("account", class="OroCRMAccountBundle:Account", options={"id" = "accountId"}) |
||
156 | * @ParamConverter("channel", class="OroCRMChannelBundle:Channel", options={"id" = "channelId"}) |
||
157 | * @AclAncestor("orocrm_magento_customer_view") |
||
158 | * @Template |
||
159 | */ |
||
160 | public function accountCustomersInfoAction(Account $account, Channel $channel) |
||
174 | |||
175 | /** |
||
176 | * @param Customer $customer |
||
177 | * @param Channel $channel |
||
178 | * @return array |
||
179 | * |
||
180 | * @Route( |
||
181 | * "/widget/customer-info/{id}/{channelId}", |
||
182 | * name="orocrm_magento_widget_customer_info", |
||
183 | * requirements={"id"="\d+", "channelId"="\d+"} |
||
184 | * ) |
||
185 | * @ParamConverter("channel", class="OroCRMChannelBundle:Channel", options={"id" = "channelId"}) |
||
186 | * @AclAncestor("orocrm_magento_customer_view") |
||
187 | * @Template |
||
188 | */ |
||
189 | public function customerInfoAction(Customer $customer, Channel $channel) |
||
198 | |||
199 | /** |
||
200 | * @param Customer $customer |
||
201 | * @return array |
||
202 | * |
||
203 | * @Route("/order/{id}", name="orocrm_magento_customer_orderplace", requirements={"id"="\d+"})) |
||
204 | * @AclAncestor("orocrm_magento_customer_view") |
||
205 | * @Template |
||
206 | */ |
||
207 | public function placeOrderAction(Customer $customer) |
||
211 | |||
212 | /** |
||
213 | * @param Customer $customer |
||
214 | * @return array |
||
215 | * |
||
216 | * @Route("/addressBook/{id}", name="orocrm_magento_customer_address_book", requirements={"id"="\d+"})) |
||
217 | * @AclAncestor("orocrm_magento_customer_view") |
||
218 | * @Template |
||
219 | */ |
||
220 | public function addressBookAction(Customer $customer) |
||
224 | |||
225 | /** |
||
226 | * @return SecurityFacade |
||
227 | */ |
||
228 | protected function getSecurityFacade() |
||
232 | } |
||
233 |