@@ -2,7 +2,7 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | Route::group(config('shop.routes.login', ['middleware' => ['web']]), function() { |
| 4 | 4 | |
| 5 | - Route::match( array( 'GET' ), 'admin', array( |
|
| 5 | + Route::match(array('GET'), 'admin', array( |
|
| 6 | 6 | 'as' => 'aimeos_shop_admin', |
| 7 | 7 | 'uses' => 'Aimeos\Shop\Controller\AdminController@indexAction' |
| 8 | 8 | )); |
@@ -12,99 +12,99 @@ discard block |
||
| 12 | 12 | |
| 13 | 13 | Route::group(config('shop.routes.admin', ['middleware' => ['web', 'auth']]), function() { |
| 14 | 14 | |
| 15 | - Route::match( array( 'GET' ), 'extadm', array( |
|
| 15 | + Route::match(array('GET'), 'extadm', array( |
|
| 16 | 16 | 'as' => 'aimeos_shop_extadm', |
| 17 | 17 | 'uses' => 'Aimeos\Shop\Controller\ExtadmController@indexAction' |
| 18 | 18 | )); |
| 19 | 19 | |
| 20 | - Route::match( array( 'GET' ), 'extadm/file', array( |
|
| 20 | + Route::match(array('GET'), 'extadm/file', array( |
|
| 21 | 21 | 'as' => 'aimeos_shop_extadm_file', |
| 22 | 22 | 'uses' => 'Aimeos\Shop\Controller\ExtadmController@fileAction' |
| 23 | 23 | )); |
| 24 | 24 | |
| 25 | - Route::match( array( 'POST' ), 'extadm/do', array( |
|
| 25 | + Route::match(array('POST'), 'extadm/do', array( |
|
| 26 | 26 | 'as' => 'aimeos_shop_extadm_json', |
| 27 | 27 | 'uses' => 'Aimeos\Shop\Controller\ExtadmController@doAction' |
| 28 | 28 | )); |
| 29 | 29 | |
| 30 | 30 | |
| 31 | - Route::match( array( 'GET', 'POST' ), 'jqadm/copy/{resource}/{id}', array( |
|
| 31 | + Route::match(array('GET', 'POST'), 'jqadm/copy/{resource}/{id}', array( |
|
| 32 | 32 | 'as' => 'aimeos_shop_jqadm_copy', |
| 33 | 33 | 'uses' => 'Aimeos\Shop\Controller\JqadmController@copyAction' |
| 34 | - ))->where( array( 'resource' => '[^0-9]+', 'id' => '[0-9]+' ) ); |
|
| 34 | + ))->where(array('resource' => '[^0-9]+', 'id' => '[0-9]+')); |
|
| 35 | 35 | |
| 36 | - Route::match( array( 'GET', 'POST' ), 'jqadm/create/{resource}', array( |
|
| 36 | + Route::match(array('GET', 'POST'), 'jqadm/create/{resource}', array( |
|
| 37 | 37 | 'as' => 'aimeos_shop_jqadm_create', |
| 38 | 38 | 'uses' => 'Aimeos\Shop\Controller\JqadmController@createAction' |
| 39 | - ))->where( array( 'resource' => '[^0-9]+' ) ); |
|
| 39 | + ))->where(array('resource' => '[^0-9]+')); |
|
| 40 | 40 | |
| 41 | - Route::match( array( 'GET', 'POST' ), 'jqadm/delete/{resource}/{id}', array( |
|
| 41 | + Route::match(array('GET', 'POST'), 'jqadm/delete/{resource}/{id}', array( |
|
| 42 | 42 | 'as' => 'aimeos_shop_jqadm_delete', |
| 43 | 43 | 'uses' => 'Aimeos\Shop\Controller\JqadmController@deleteAction' |
| 44 | - ))->where( array( 'resource' => '[^0-9]+', 'id' => '[0-9]+' ) ); |
|
| 44 | + ))->where(array('resource' => '[^0-9]+', 'id' => '[0-9]+')); |
|
| 45 | 45 | |
| 46 | - Route::match( array( 'GET' ), 'jqadm/get/{resource}/{id}', array( |
|
| 46 | + Route::match(array('GET'), 'jqadm/get/{resource}/{id}', array( |
|
| 47 | 47 | 'as' => 'aimeos_shop_jqadm_get', |
| 48 | 48 | 'uses' => 'Aimeos\Shop\Controller\JqadmController@getAction' |
| 49 | - ))->where( array( 'resource' => '[^0-9]*', 'id' => '[0-9]+' ) ); |
|
| 49 | + ))->where(array('resource' => '[^0-9]*', 'id' => '[0-9]+')); |
|
| 50 | 50 | |
| 51 | - Route::match( array( 'POST' ), 'jqadm/save/{resource}/{id?}', array( |
|
| 51 | + Route::match(array('POST'), 'jqadm/save/{resource}/{id?}', array( |
|
| 52 | 52 | 'as' => 'aimeos_shop_jqadm_save', |
| 53 | 53 | 'uses' => 'Aimeos\Shop\Controller\JqadmController@saveAction' |
| 54 | - ))->where( array( 'resource' => '[^0-9]+', 'id' => '[0-9]*' ) ); |
|
| 54 | + ))->where(array('resource' => '[^0-9]+', 'id' => '[0-9]*')); |
|
| 55 | 55 | |
| 56 | - Route::match( array( 'GET', 'POST' ), 'jqadm/search/{resource}', array( |
|
| 56 | + Route::match(array('GET', 'POST'), 'jqadm/search/{resource}', array( |
|
| 57 | 57 | 'as' => 'aimeos_shop_jqadm_search', |
| 58 | 58 | 'uses' => 'Aimeos\Shop\Controller\JqadmController@searchAction' |
| 59 | - ))->where( array( 'resource' => '[^0-9]+' ) ); |
|
| 59 | + ))->where(array('resource' => '[^0-9]+')); |
|
| 60 | 60 | |
| 61 | 61 | |
| 62 | - Route::match( array( 'DELETE' ), 'jsonadm/{resource}/{id?}', array( |
|
| 62 | + Route::match(array('DELETE'), 'jsonadm/{resource}/{id?}', array( |
|
| 63 | 63 | 'as' => 'aimeos_shop_jsonadm_delete', |
| 64 | 64 | 'uses' => 'Aimeos\Shop\Controller\JsonadmController@deleteAction' |
| 65 | - ))->where( array( 'resource' => '[^0-9]+', 'id' => '[0-9]*' ) ); |
|
| 65 | + ))->where(array('resource' => '[^0-9]+', 'id' => '[0-9]*')); |
|
| 66 | 66 | |
| 67 | - Route::match( array( 'GET' ), 'jsonadm/{resource}/{id?}', array( |
|
| 67 | + Route::match(array('GET'), 'jsonadm/{resource}/{id?}', array( |
|
| 68 | 68 | 'as' => 'aimeos_shop_jsonadm_get', |
| 69 | 69 | 'uses' => 'Aimeos\Shop\Controller\JsonadmController@getAction' |
| 70 | - ))->where( array( 'resource' => '[^0-9]+', 'id' => '[0-9]*' ) ); |
|
| 70 | + ))->where(array('resource' => '[^0-9]+', 'id' => '[0-9]*')); |
|
| 71 | 71 | |
| 72 | - Route::match( array( 'PATCH' ), 'jsonadm/{resource}/{id?}', array( |
|
| 72 | + Route::match(array('PATCH'), 'jsonadm/{resource}/{id?}', array( |
|
| 73 | 73 | 'as' => 'aimeos_shop_jsonadm_patch', |
| 74 | 74 | 'uses' => 'Aimeos\Shop\Controller\JsonadmController@patchAction' |
| 75 | - ))->where( array( 'resource' => '[^0-9]+', 'id' => '[0-9]*' ) ); |
|
| 75 | + ))->where(array('resource' => '[^0-9]+', 'id' => '[0-9]*')); |
|
| 76 | 76 | |
| 77 | - Route::match( array( 'POST' ), 'jsonadm/{resource}/{id?}', array( |
|
| 77 | + Route::match(array('POST'), 'jsonadm/{resource}/{id?}', array( |
|
| 78 | 78 | 'as' => 'aimeos_shop_jsonadm_post', |
| 79 | 79 | 'uses' => 'Aimeos\Shop\Controller\JsonadmController@postAction' |
| 80 | - ))->where( array( 'resource' => '[^0-9]+', 'id' => '[0-9]*' ) ); |
|
| 80 | + ))->where(array('resource' => '[^0-9]+', 'id' => '[0-9]*')); |
|
| 81 | 81 | |
| 82 | - Route::match( array( 'PUT' ), 'jsonadm/{resource}/{id?}', array( |
|
| 82 | + Route::match(array('PUT'), 'jsonadm/{resource}/{id?}', array( |
|
| 83 | 83 | 'as' => 'aimeos_shop_jsonadm_put', |
| 84 | 84 | 'uses' => 'Aimeos\Shop\Controller\JsonadmController@putAction' |
| 85 | - ))->where( array( 'resource' => '[^0-9]+', 'id' => '[0-9]*' ) ); |
|
| 85 | + ))->where(array('resource' => '[^0-9]+', 'id' => '[0-9]*')); |
|
| 86 | 86 | |
| 87 | - Route::match( array( 'OPTIONS' ), 'jsonadm/{resource?}', array( |
|
| 87 | + Route::match(array('OPTIONS'), 'jsonadm/{resource?}', array( |
|
| 88 | 88 | 'as' => 'aimeos_shop_jsonadm_options', |
| 89 | 89 | 'uses' => 'Aimeos\Shop\Controller\JsonadmController@optionsAction' |
| 90 | - ))->where( array( 'resource' => '[^0-9]*' ) ); |
|
| 90 | + ))->where(array('resource' => '[^0-9]*')); |
|
| 91 | 91 | |
| 92 | 92 | }); |
| 93 | 93 | |
| 94 | 94 | |
| 95 | 95 | Route::group(config('shop.routes.account', ['middleware' => ['web', 'auth']]), function() { |
| 96 | 96 | |
| 97 | - Route::match( array( 'GET', 'POST' ), 'myaccount', array( |
|
| 97 | + Route::match(array('GET', 'POST'), 'myaccount', array( |
|
| 98 | 98 | 'as' => 'aimeos_shop_account', |
| 99 | 99 | 'uses' => 'Aimeos\Shop\Controller\AccountController@indexAction' |
| 100 | 100 | )); |
| 101 | 101 | |
| 102 | - Route::match( array( 'GET', 'POST' ), 'myaccount/favorite/{fav_action?}/{fav_id?}/{d_prodid?}/{d_name?}/{l_pos?}', array( |
|
| 102 | + Route::match(array('GET', 'POST'), 'myaccount/favorite/{fav_action?}/{fav_id?}/{d_prodid?}/{d_name?}/{l_pos?}', array( |
|
| 103 | 103 | 'as' => 'aimeos_shop_account_favorite', |
| 104 | 104 | 'uses' => 'Aimeos\Shop\Controller\AccountController@indexAction' |
| 105 | 105 | )); |
| 106 | 106 | |
| 107 | - Route::match( array( 'GET', 'POST' ), 'myaccount/watch/{wat_action?}/{wat_id?}/{d_prodid?}/{d_name?}/{l_pos?}', array( |
|
| 107 | + Route::match(array('GET', 'POST'), 'myaccount/watch/{wat_action?}/{wat_id?}/{d_prodid?}/{d_name?}/{l_pos?}', array( |
|
| 108 | 108 | 'as' => 'aimeos_shop_account_watch', |
| 109 | 109 | 'uses' => 'Aimeos\Shop\Controller\AccountController@indexAction' |
| 110 | 110 | )); |
@@ -114,42 +114,42 @@ discard block |
||
| 114 | 114 | |
| 115 | 115 | Route::group(config('shop.routes.default', ['middleware' => ['web']]), function() { |
| 116 | 116 | |
| 117 | - Route::match( array( 'GET', 'POST' ), 'count', array( |
|
| 117 | + Route::match(array('GET', 'POST'), 'count', array( |
|
| 118 | 118 | 'as' => 'aimeos_shop_count', |
| 119 | 119 | 'uses' => 'Aimeos\Shop\Controller\CatalogController@countAction' |
| 120 | 120 | )); |
| 121 | 121 | |
| 122 | - Route::match( array( 'GET', 'POST' ), 'detail/{d_prodid}/{d_name?}/{l_pos?}', array( |
|
| 122 | + Route::match(array('GET', 'POST'), 'detail/{d_prodid}/{d_name?}/{l_pos?}', array( |
|
| 123 | 123 | 'as' => 'aimeos_shop_detail', |
| 124 | 124 | 'uses' => 'Aimeos\Shop\Controller\CatalogController@detailAction' |
| 125 | 125 | )); |
| 126 | 126 | |
| 127 | - Route::match( array( 'GET', 'POST' ), 'detail/pin/{pin_action?}/{pin_id?}/{d_prodid?}/{d_name?}/{l_pos?}', array( |
|
| 127 | + Route::match(array('GET', 'POST'), 'detail/pin/{pin_action?}/{pin_id?}/{d_prodid?}/{d_name?}/{l_pos?}', array( |
|
| 128 | 128 | 'as' => 'aimeos_shop_session_pinned', |
| 129 | 129 | 'uses' => 'Aimeos\Shop\Controller\CatalogController@detailAction' |
| 130 | 130 | )); |
| 131 | 131 | |
| 132 | - Route::match( array( 'GET', 'POST' ), 'list', array( |
|
| 132 | + Route::match(array('GET', 'POST'), 'list', array( |
|
| 133 | 133 | 'as' => 'aimeos_shop_list', |
| 134 | 134 | 'uses' => 'Aimeos\Shop\Controller\CatalogController@listAction' |
| 135 | 135 | )); |
| 136 | 136 | |
| 137 | - Route::match( array( 'GET', 'POST' ), 'suggest', array( |
|
| 137 | + Route::match(array('GET', 'POST'), 'suggest', array( |
|
| 138 | 138 | 'as' => 'aimeos_shop_suggest', |
| 139 | 139 | 'uses' => 'Aimeos\Shop\Controller\CatalogController@suggestAction' |
| 140 | 140 | )); |
| 141 | 141 | |
| 142 | - Route::match( array( 'GET', 'POST' ), 'stock', array( |
|
| 142 | + Route::match(array('GET', 'POST'), 'stock', array( |
|
| 143 | 143 | 'as' => 'aimeos_shop_stock', |
| 144 | 144 | 'uses' => 'Aimeos\Shop\Controller\CatalogController@stockAction' |
| 145 | 145 | )); |
| 146 | 146 | |
| 147 | - Route::match( array( 'GET', 'POST' ), 'basket', array( |
|
| 147 | + Route::match(array('GET', 'POST'), 'basket', array( |
|
| 148 | 148 | 'as' => 'aimeos_shop_basket', |
| 149 | 149 | 'uses' => 'Aimeos\Shop\Controller\BasketController@indexAction' |
| 150 | 150 | )); |
| 151 | 151 | |
| 152 | - Route::match( array( 'GET', 'POST' ), 'checkout/{c_step?}', array( |
|
| 152 | + Route::match(array('GET', 'POST'), 'checkout/{c_step?}', array( |
|
| 153 | 153 | 'as' => 'aimeos_shop_checkout', |
| 154 | 154 | 'uses' => 'Aimeos\Shop\Controller\CheckoutController@indexAction' |
| 155 | 155 | )); |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | |
| 160 | 160 | Route::group(config('shop.routes.confirm', ['middleware' => ['web']]), function() { |
| 161 | 161 | |
| 162 | - Route::match( array( 'GET', 'POST' ), 'confirm', array( |
|
| 162 | + Route::match(array('GET', 'POST'), 'confirm', array( |
|
| 163 | 163 | 'as' => 'aimeos_shop_confirm', |
| 164 | 164 | 'uses' => 'Aimeos\Shop\Controller\CheckoutController@confirmAction' |
| 165 | 165 | )); |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | |
| 170 | 170 | Route::group(config('shop.routes.update', []), function() { |
| 171 | 171 | |
| 172 | - Route::match( array( 'GET', 'POST' ), 'update', array( |
|
| 172 | + Route::match(array('GET', 'POST'), 'update', array( |
|
| 173 | 173 | 'as' => 'aimeos_shop_update', |
| 174 | 174 | 'uses' => 'Aimeos\Shop\Controller\CheckoutController@updateAction' |
| 175 | 175 | )); |
@@ -35,19 +35,19 @@ discard block |
||
| 35 | 35 | * @param \Illuminate\Http\Request $request Request object |
| 36 | 36 | * @return \Illuminate\Http\Response Response object containing the generated output |
| 37 | 37 | */ |
| 38 | - public function deleteAction( Request $request ) |
|
| 38 | + public function deleteAction(Request $request) |
|
| 39 | 39 | { |
| 40 | - if( config( 'shop.authorize', true ) ) { |
|
| 41 | - $this->authorize( 'admin' ); |
|
| 40 | + if (config('shop.authorize', true)) { |
|
| 41 | + $this->authorize('admin'); |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | $status = 500; |
| 45 | 45 | $header = $request->headers->all(); |
| 46 | 46 | |
| 47 | 47 | $cntl = $this->createController(); |
| 48 | - $result = $cntl->delete( $request->getContent(), $header, $status ); |
|
| 48 | + $result = $cntl->delete($request->getContent(), $header, $status); |
|
| 49 | 49 | |
| 50 | - return $this->createResponse( $result, $status, $header ); |
|
| 50 | + return $this->createResponse($result, $status, $header); |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | |
@@ -57,19 +57,19 @@ discard block |
||
| 57 | 57 | * @param \Illuminate\Http\Request $request Request object |
| 58 | 58 | * @return \Illuminate\Http\Response Response object containing the generated output |
| 59 | 59 | */ |
| 60 | - public function getAction( Request $request ) |
|
| 60 | + public function getAction(Request $request) |
|
| 61 | 61 | { |
| 62 | - if( config( 'shop.authorize', true ) ) { |
|
| 63 | - $this->authorize( 'admin' ); |
|
| 62 | + if (config('shop.authorize', true)) { |
|
| 63 | + $this->authorize('admin'); |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | $status = 500; |
| 67 | 67 | $header = $request->headers->all(); |
| 68 | 68 | |
| 69 | 69 | $cntl = $this->createController(); |
| 70 | - $result = $cntl->get( $request->getContent(), $header, $status ); |
|
| 70 | + $result = $cntl->get($request->getContent(), $header, $status); |
|
| 71 | 71 | |
| 72 | - return $this->createResponse( $result, $status, $header ); |
|
| 72 | + return $this->createResponse($result, $status, $header); |
|
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | |
@@ -79,19 +79,19 @@ discard block |
||
| 79 | 79 | * @param \Illuminate\Http\Request $request Request object |
| 80 | 80 | * @return \Illuminate\Http\Response Response object containing the generated output |
| 81 | 81 | */ |
| 82 | - public function patchAction( Request $request ) |
|
| 82 | + public function patchAction(Request $request) |
|
| 83 | 83 | { |
| 84 | - if( config( 'shop.authorize', true ) ) { |
|
| 85 | - $this->authorize( 'admin' ); |
|
| 84 | + if (config('shop.authorize', true)) { |
|
| 85 | + $this->authorize('admin'); |
|
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | $status = 500; |
| 89 | 89 | $header = $request->headers->all(); |
| 90 | 90 | |
| 91 | 91 | $cntl = $this->createController(); |
| 92 | - $result = $cntl->patch( $request->getContent(), $header, $status ); |
|
| 92 | + $result = $cntl->patch($request->getContent(), $header, $status); |
|
| 93 | 93 | |
| 94 | - return $this->createResponse( $result, $status, $header ); |
|
| 94 | + return $this->createResponse($result, $status, $header); |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | |
@@ -101,19 +101,19 @@ discard block |
||
| 101 | 101 | * @param \Illuminate\Http\Request $request Request object |
| 102 | 102 | * @return \Illuminate\Http\Response Response object containing the generated output |
| 103 | 103 | */ |
| 104 | - public function postAction( Request $request ) |
|
| 104 | + public function postAction(Request $request) |
|
| 105 | 105 | { |
| 106 | - if( config( 'shop.authorize', true ) ) { |
|
| 107 | - $this->authorize( 'admin' ); |
|
| 106 | + if (config('shop.authorize', true)) { |
|
| 107 | + $this->authorize('admin'); |
|
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | $status = 500; |
| 111 | 111 | $header = $request->headers->all(); |
| 112 | 112 | |
| 113 | 113 | $cntl = $this->createController(); |
| 114 | - $result = $cntl->post( $request->getContent(), $header, $status ); |
|
| 114 | + $result = $cntl->post($request->getContent(), $header, $status); |
|
| 115 | 115 | |
| 116 | - return $this->createResponse( $result, $status, $header ); |
|
| 116 | + return $this->createResponse($result, $status, $header); |
|
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | |
@@ -123,19 +123,19 @@ discard block |
||
| 123 | 123 | * @param \Illuminate\Http\Request $request Request object |
| 124 | 124 | * @return \Illuminate\Http\Response Response object containing the generated output |
| 125 | 125 | */ |
| 126 | - public function putAction( Request $request ) |
|
| 126 | + public function putAction(Request $request) |
|
| 127 | 127 | { |
| 128 | - if( config( 'shop.authorize', true ) ) { |
|
| 129 | - $this->authorize( 'admin' ); |
|
| 128 | + if (config('shop.authorize', true)) { |
|
| 129 | + $this->authorize('admin'); |
|
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | $status = 500; |
| 133 | 133 | $header = $request->headers->all(); |
| 134 | 134 | |
| 135 | 135 | $cntl = $this->createController(); |
| 136 | - $result = $cntl->put( $request->getContent(), $header, $status ); |
|
| 136 | + $result = $cntl->put($request->getContent(), $header, $status); |
|
| 137 | 137 | |
| 138 | - return $this->createResponse( $result, $status, $header ); |
|
| 138 | + return $this->createResponse($result, $status, $header); |
|
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | |
@@ -145,19 +145,19 @@ discard block |
||
| 145 | 145 | * @param \Illuminate\Http\Request $request Request object |
| 146 | 146 | * @return \Illuminate\Http\Response Response object containing the generated output |
| 147 | 147 | */ |
| 148 | - public function optionsAction( Request $request ) |
|
| 148 | + public function optionsAction(Request $request) |
|
| 149 | 149 | { |
| 150 | - if( config( 'shop.authorize', true ) ) { |
|
| 151 | - $this->authorize( 'admin' ); |
|
| 150 | + if (config('shop.authorize', true)) { |
|
| 151 | + $this->authorize('admin'); |
|
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | $status = 500; |
| 155 | 155 | $header = $request->headers->all(); |
| 156 | 156 | |
| 157 | 157 | $cntl = $this->createController(); |
| 158 | - $result = $cntl->options( $request->getContent(), $header, $status ); |
|
| 158 | + $result = $cntl->options($request->getContent(), $header, $status); |
|
| 159 | 159 | |
| 160 | - return $this->createResponse( $result, $status, $header ); |
|
| 160 | + return $this->createResponse($result, $status, $header); |
|
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | |
@@ -168,20 +168,20 @@ discard block |
||
| 168 | 168 | */ |
| 169 | 169 | protected function createController() |
| 170 | 170 | { |
| 171 | - $site = Route::input( 'site', Input::get( 'site', 'default' ) ); |
|
| 172 | - $lang = Input::get( 'lang', config( 'app.locale', 'en' ) ); |
|
| 173 | - $resource = Route::input( 'resource' ); |
|
| 171 | + $site = Route::input('site', Input::get('site', 'default')); |
|
| 172 | + $lang = Input::get('lang', config('app.locale', 'en')); |
|
| 173 | + $resource = Route::input('resource'); |
|
| 174 | 174 | |
| 175 | - $aimeos = app( '\Aimeos\Shop\Base\Aimeos' )->get(); |
|
| 176 | - $templatePaths = $aimeos->getCustomPaths( 'controller/jsonadm/templates' ); |
|
| 175 | + $aimeos = app('\Aimeos\Shop\Base\Aimeos')->get(); |
|
| 176 | + $templatePaths = $aimeos->getCustomPaths('controller/jsonadm/templates'); |
|
| 177 | 177 | |
| 178 | - $context = app( '\Aimeos\Shop\Base\Context' )->get( false ); |
|
| 179 | - $context = $this->setLocale( $context, $site, $lang ); |
|
| 178 | + $context = app('\Aimeos\Shop\Base\Context')->get(false); |
|
| 179 | + $context = $this->setLocale($context, $site, $lang); |
|
| 180 | 180 | |
| 181 | - $view = app( '\Aimeos\Shop\Base\View' )->create( $context->getConfig(), $templatePaths, $lang ); |
|
| 182 | - $context->setView( $view ); |
|
| 181 | + $view = app('\Aimeos\Shop\Base\View')->create($context->getConfig(), $templatePaths, $lang); |
|
| 182 | + $context->setView($view); |
|
| 183 | 183 | |
| 184 | - return \Aimeos\Controller\JsonAdm\Factory::createController( $context, $templatePaths, $resource ); |
|
| 184 | + return \Aimeos\Controller\JsonAdm\Factory::createController($context, $templatePaths, $resource); |
|
| 185 | 185 | } |
| 186 | 186 | |
| 187 | 187 | |
@@ -193,12 +193,12 @@ discard block |
||
| 193 | 193 | * @param array $header List of HTTP headers |
| 194 | 194 | * @return \Illuminate\Http\Response HTTP response object |
| 195 | 195 | */ |
| 196 | - protected function createResponse( $content, $status, array $header ) |
|
| 196 | + protected function createResponse($content, $status, array $header) |
|
| 197 | 197 | { |
| 198 | - $response = Response::make( $content, $status ); |
|
| 198 | + $response = Response::make($content, $status); |
|
| 199 | 199 | |
| 200 | - foreach( $header as $key => $value ) { |
|
| 201 | - $response->header( $key, $value ); |
|
| 200 | + foreach ($header as $key => $value) { |
|
| 201 | + $response->header($key, $value); |
|
| 202 | 202 | } |
| 203 | 203 | |
| 204 | 204 | return $response; |
@@ -213,23 +213,23 @@ discard block |
||
| 213 | 213 | * @param string $lang ISO language code, e.g. "en" or "en_GB" |
| 214 | 214 | * @return \Aimeos\MShop\Context\Item\Iface Modified context object |
| 215 | 215 | */ |
| 216 | - protected function setLocale( \Aimeos\MShop\Context\Item\Iface $context, $sitecode, $lang ) |
|
| 216 | + protected function setLocale(\Aimeos\MShop\Context\Item\Iface $context, $sitecode, $lang) |
|
| 217 | 217 | { |
| 218 | - $localeManager = \Aimeos\MShop\Factory::createManager( $context, 'locale' ); |
|
| 218 | + $localeManager = \Aimeos\MShop\Factory::createManager($context, 'locale'); |
|
| 219 | 219 | |
| 220 | 220 | try |
| 221 | 221 | { |
| 222 | - $localeItem = $localeManager->bootstrap( $sitecode, '', '', false ); |
|
| 223 | - $localeItem->setLanguageId( null ); |
|
| 224 | - $localeItem->setCurrencyId( null ); |
|
| 222 | + $localeItem = $localeManager->bootstrap($sitecode, '', '', false); |
|
| 223 | + $localeItem->setLanguageId(null); |
|
| 224 | + $localeItem->setCurrencyId(null); |
|
| 225 | 225 | } |
| 226 | - catch( \Aimeos\MShop\Locale\Exception $e ) |
|
| 226 | + catch (\Aimeos\MShop\Locale\Exception $e) |
|
| 227 | 227 | { |
| 228 | 228 | $localeItem = $localeManager->createItem(); |
| 229 | 229 | } |
| 230 | 230 | |
| 231 | - $context->setLocale( $localeItem ); |
|
| 232 | - $context->setI18n( app('\Aimeos\Shop\Base\I18n')->get( array( $lang ) ) ); |
|
| 231 | + $context->setLocale($localeItem); |
|
| 232 | + $context->setI18n(app('\Aimeos\Shop\Base\I18n')->get(array($lang))); |
|
| 233 | 233 | |
| 234 | 234 | return $context; |
| 235 | 235 | } |
@@ -34,12 +34,12 @@ discard block |
||
| 34 | 34 | */ |
| 35 | 35 | public function copyAction() |
| 36 | 36 | { |
| 37 | - if( config( 'shop.authorize', true ) ) { |
|
| 38 | - $this->authorize( 'admin' ); |
|
| 37 | + if (config('shop.authorize', true)) { |
|
| 38 | + $this->authorize('admin'); |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | $cntl = $this->createClient(); |
| 42 | - return $this->getHtml( $cntl->copy() ); |
|
| 42 | + return $this->getHtml($cntl->copy()); |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | |
@@ -48,14 +48,14 @@ discard block |
||
| 48 | 48 | * |
| 49 | 49 | * @return string Generated output |
| 50 | 50 | */ |
| 51 | - public function createAction( $resource ) |
|
| 51 | + public function createAction($resource) |
|
| 52 | 52 | { |
| 53 | - if( config( 'shop.authorize', true ) ) { |
|
| 54 | - $this->authorize( 'admin' ); |
|
| 53 | + if (config('shop.authorize', true)) { |
|
| 54 | + $this->authorize('admin'); |
|
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | $cntl = $this->createClient(); |
| 58 | - return $this->getHtml( $cntl->create() ); |
|
| 58 | + return $this->getHtml($cntl->create()); |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | |
@@ -64,14 +64,14 @@ discard block |
||
| 64 | 64 | * |
| 65 | 65 | * @return string Generated output |
| 66 | 66 | */ |
| 67 | - public function deleteAction( $resource, $id ) |
|
| 67 | + public function deleteAction($resource, $id) |
|
| 68 | 68 | { |
| 69 | - if( config( 'shop.authorize', true ) ) { |
|
| 70 | - $this->authorize( 'admin' ); |
|
| 69 | + if (config('shop.authorize', true)) { |
|
| 70 | + $this->authorize('admin'); |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | $cntl = $this->createClient(); |
| 74 | - return $this->getHtml( $cntl->delete() . $cntl->search() ); |
|
| 74 | + return $this->getHtml($cntl->delete() . $cntl->search()); |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | |
@@ -82,12 +82,12 @@ discard block |
||
| 82 | 82 | */ |
| 83 | 83 | public function getAction() |
| 84 | 84 | { |
| 85 | - if( config( 'shop.authorize', true ) ) { |
|
| 86 | - $this->authorize( 'admin' ); |
|
| 85 | + if (config('shop.authorize', true)) { |
|
| 86 | + $this->authorize('admin'); |
|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | $cntl = $this->createClient(); |
| 90 | - return $this->getHtml( $cntl->get() ); |
|
| 90 | + return $this->getHtml($cntl->get()); |
|
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | |
@@ -96,14 +96,14 @@ discard block |
||
| 96 | 96 | * |
| 97 | 97 | * @return string Generated output |
| 98 | 98 | */ |
| 99 | - public function saveAction( $resource ) |
|
| 99 | + public function saveAction($resource) |
|
| 100 | 100 | { |
| 101 | - if( config( 'shop.authorize', true ) ) { |
|
| 102 | - $this->authorize( 'admin' ); |
|
| 101 | + if (config('shop.authorize', true)) { |
|
| 102 | + $this->authorize('admin'); |
|
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | $cntl = $this->createClient(); |
| 106 | - return $this->getHtml( ( $cntl->save() ? : $cntl->search() ) ); |
|
| 106 | + return $this->getHtml(($cntl->save() ?: $cntl->search())); |
|
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | |
@@ -112,14 +112,14 @@ discard block |
||
| 112 | 112 | * |
| 113 | 113 | * @return string Generated output |
| 114 | 114 | */ |
| 115 | - public function searchAction( $resource ) |
|
| 115 | + public function searchAction($resource) |
|
| 116 | 116 | { |
| 117 | - if( config( 'shop.authorize', true ) ) { |
|
| 118 | - $this->authorize( 'admin' ); |
|
| 117 | + if (config('shop.authorize', true)) { |
|
| 118 | + $this->authorize('admin'); |
|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | $cntl = $this->createClient(); |
| 122 | - return $this->getHtml( $cntl->search() ); |
|
| 122 | + return $this->getHtml($cntl->search()); |
|
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | |
@@ -130,20 +130,20 @@ discard block |
||
| 130 | 130 | */ |
| 131 | 131 | protected function createClient() |
| 132 | 132 | { |
| 133 | - $site = Route::input( 'site', Input::get( 'site', 'default' ) ); |
|
| 134 | - $lang = Input::get( 'lang', config( 'app.locale', 'en' ) ); |
|
| 135 | - $resource = Route::input( 'resource' ); |
|
| 133 | + $site = Route::input('site', Input::get('site', 'default')); |
|
| 134 | + $lang = Input::get('lang', config('app.locale', 'en')); |
|
| 135 | + $resource = Route::input('resource'); |
|
| 136 | 136 | |
| 137 | - $aimeos = app( '\Aimeos\Shop\Base\Aimeos' )->get(); |
|
| 138 | - $templatePaths = $aimeos->getCustomPaths( 'admin/jqadm/templates' ); |
|
| 137 | + $aimeos = app('\Aimeos\Shop\Base\Aimeos')->get(); |
|
| 138 | + $templatePaths = $aimeos->getCustomPaths('admin/jqadm/templates'); |
|
| 139 | 139 | |
| 140 | - $context = app( '\Aimeos\Shop\Base\Context' )->get( false ); |
|
| 141 | - $context = $this->setLocale( $context, $site, $lang ); |
|
| 140 | + $context = app('\Aimeos\Shop\Base\Context')->get(false); |
|
| 141 | + $context = $this->setLocale($context, $site, $lang); |
|
| 142 | 142 | |
| 143 | - $view = app( '\Aimeos\Shop\Base\View' )->create( $context->getConfig(), $templatePaths, $lang ); |
|
| 144 | - $context->setView( $view ); |
|
| 143 | + $view = app('\Aimeos\Shop\Base\View')->create($context->getConfig(), $templatePaths, $lang); |
|
| 144 | + $context->setView($view); |
|
| 145 | 145 | |
| 146 | - return \Aimeos\Admin\JQAdm\Factory::createClient( $context, $templatePaths, $resource ); |
|
| 146 | + return \Aimeos\Admin\JQAdm\Factory::createClient($context, $templatePaths, $resource); |
|
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | |
@@ -153,12 +153,12 @@ discard block |
||
| 153 | 153 | * @param string $content Content from admin client |
| 154 | 154 | * @return \Illuminate\Contracts\View\View View for rendering the output |
| 155 | 155 | */ |
| 156 | - protected function getHtml( $content ) |
|
| 156 | + protected function getHtml($content) |
|
| 157 | 157 | { |
| 158 | - $version = app( '\Aimeos\Shop\Base\Aimeos' )->getVersion(); |
|
| 159 | - $content = str_replace( ['{type}', '{version}'], ['Laravel', $version], $content ); |
|
| 158 | + $version = app('\Aimeos\Shop\Base\Aimeos')->getVersion(); |
|
| 159 | + $content = str_replace(['{type}', '{version}'], ['Laravel', $version], $content); |
|
| 160 | 160 | |
| 161 | - return View::make( 'shop::jqadm.index', array( 'content' => $content ) ); |
|
| 161 | + return View::make('shop::jqadm.index', array('content' => $content)); |
|
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | |
@@ -170,23 +170,23 @@ discard block |
||
| 170 | 170 | * @param string $lang ISO language code, e.g. "en" or "en_GB" |
| 171 | 171 | * @return \Aimeos\MShop\Context\Item\Iface Modified context object |
| 172 | 172 | */ |
| 173 | - protected function setLocale( \Aimeos\MShop\Context\Item\Iface $context, $sitecode = 'default', $lang = null ) |
|
| 173 | + protected function setLocale(\Aimeos\MShop\Context\Item\Iface $context, $sitecode = 'default', $lang = null) |
|
| 174 | 174 | { |
| 175 | - $localeManager = \Aimeos\MShop\Factory::createManager( $context, 'locale' ); |
|
| 175 | + $localeManager = \Aimeos\MShop\Factory::createManager($context, 'locale'); |
|
| 176 | 176 | |
| 177 | 177 | try |
| 178 | 178 | { |
| 179 | - $localeItem = $localeManager->bootstrap( $sitecode, '', '', false ); |
|
| 180 | - $localeItem->setLanguageId( null ); |
|
| 181 | - $localeItem->setCurrencyId( null ); |
|
| 179 | + $localeItem = $localeManager->bootstrap($sitecode, '', '', false); |
|
| 180 | + $localeItem->setLanguageId(null); |
|
| 181 | + $localeItem->setCurrencyId(null); |
|
| 182 | 182 | } |
| 183 | - catch( \Aimeos\MShop\Locale\Exception $e ) |
|
| 183 | + catch (\Aimeos\MShop\Locale\Exception $e) |
|
| 184 | 184 | { |
| 185 | 185 | $localeItem = $localeManager->createItem(); |
| 186 | 186 | } |
| 187 | 187 | |
| 188 | - $context->setLocale( $localeItem ); |
|
| 189 | - $context->setI18n( app('\Aimeos\Shop\Base\I18n')->get( array( $lang ) ) ); |
|
| 188 | + $context->setLocale($localeItem); |
|
| 189 | + $context->setI18n(app('\Aimeos\Shop\Base\I18n')->get(array($lang))); |
|
| 190 | 190 | |
| 191 | 191 | return $context; |
| 192 | 192 | } |