@@ -22,19 +22,19 @@ |
||
22 | 22 | * @param string|array $sites Unique site codes |
23 | 23 | * @return \Aimeos\MShop\Locale\Item\Site\Iface[] List of site items |
24 | 24 | */ |
25 | - protected function getSiteItems( \Aimeos\MShop\Context\Item\Iface $context, $sites ) |
|
25 | + protected function getSiteItems(\Aimeos\MShop\Context\Item\Iface $context, $sites) |
|
26 | 26 | { |
27 | - $manager = \Aimeos\MShop\Factory::createManager( $context, 'locale/site' ); |
|
27 | + $manager = \Aimeos\MShop\Factory::createManager($context, 'locale/site'); |
|
28 | 28 | $search = $manager->createSearch(); |
29 | 29 | |
30 | - if( is_scalar( $sites ) && $sites != '' ) { |
|
31 | - $sites = explode( ' ', $sites ); |
|
30 | + if (is_scalar($sites) && $sites != '') { |
|
31 | + $sites = explode(' ', $sites); |
|
32 | 32 | } |
33 | 33 | |
34 | - if( !empty( $sites ) ) { |
|
35 | - $search->setConditions( $search->compare( '==', 'locale.site.code', $sites ) ); |
|
34 | + if (!empty($sites)) { |
|
35 | + $search->setConditions($search->compare('==', 'locale.site.code', $sites)); |
|
36 | 36 | } |
37 | 37 | |
38 | - return $manager->searchItems( $search ); |
|
38 | + return $manager->searchItems($search); |
|
39 | 39 | } |
40 | 40 | } |
41 | 41 | \ No newline at end of file |
@@ -28,7 +28,7 @@ |
||
28 | 28 | */ |
29 | 29 | public function indexAction() |
30 | 30 | { |
31 | - $params = app( '\Aimeos\Shop\Base\Page' )->getSections( 'basket-index' ); |
|
31 | + $params = app('\Aimeos\Shop\Base\Page')->getSections('basket-index'); |
|
32 | 32 | return \View::make('shop::basket.index', $params); |
33 | 33 | } |
34 | 34 | } |
35 | 35 | \ No newline at end of file |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | */ |
29 | 29 | public function countAction() |
30 | 30 | { |
31 | - $params = app( '\Aimeos\Shop\Base\Page' )->getSections( 'catalog-count' ); |
|
31 | + $params = app('\Aimeos\Shop\Base\Page')->getSections('catalog-count'); |
|
32 | 32 | $contents = \View::make('shop::catalog.count', $params); |
33 | 33 | |
34 | 34 | $response = \Response::make($contents, 200); |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | */ |
46 | 46 | public function detailAction() |
47 | 47 | { |
48 | - $params = app( 'Aimeos\Shop\Base\Page' )->getSections( 'catalog-detail' ); |
|
48 | + $params = app('Aimeos\Shop\Base\Page')->getSections('catalog-detail'); |
|
49 | 49 | return \View::make('shop::catalog.detail', $params); |
50 | 50 | } |
51 | 51 | |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | */ |
58 | 58 | public function listAction() |
59 | 59 | { |
60 | - $params = app( 'Aimeos\Shop\Base\Page' )->getSections( 'catalog-list' ); |
|
60 | + $params = app('Aimeos\Shop\Base\Page')->getSections('catalog-list'); |
|
61 | 61 | return \View::make('shop::catalog.list', $params); |
62 | 62 | } |
63 | 63 | |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | */ |
70 | 70 | public function stockAction() |
71 | 71 | { |
72 | - $params = app( 'Aimeos\Shop\Base\Page' )->getSections( 'catalog-stock' ); |
|
72 | + $params = app('Aimeos\Shop\Base\Page')->getSections('catalog-stock'); |
|
73 | 73 | $contents = \View::make('shop::catalog.stock', $params); |
74 | 74 | |
75 | 75 | $response = \Response::make($contents, 200); |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | */ |
87 | 87 | public function suggestAction() |
88 | 88 | { |
89 | - $params = app( 'Aimeos\Shop\Base\Page' )->getSections( 'catalog-suggest' ); |
|
89 | + $params = app('Aimeos\Shop\Base\Page')->getSections('catalog-suggest'); |
|
90 | 90 | $contents = \View::make('shop::catalog.suggest', $params); |
91 | 91 | |
92 | 92 | $response = \Response::make($contents, 200); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | */ |
29 | 29 | public function confirmAction() |
30 | 30 | { |
31 | - $params = app( '\Aimeos\Shop\Base\Page' )->getSections( 'checkout-confirm' ); |
|
31 | + $params = app('\Aimeos\Shop\Base\Page')->getSections('checkout-confirm'); |
|
32 | 32 | return \View::make('shop::checkout.confirm', $params); |
33 | 33 | } |
34 | 34 | |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | */ |
41 | 41 | public function indexAction() |
42 | 42 | { |
43 | - $params = app( '\Aimeos\Shop\Base\Page' )->getSections( 'checkout-index' ); |
|
43 | + $params = app('\Aimeos\Shop\Base\Page')->getSections('checkout-index'); |
|
44 | 44 | return \View::make('shop::checkout.index', $params); |
45 | 45 | } |
46 | 46 | |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | */ |
53 | 53 | public function updateAction() |
54 | 54 | { |
55 | - $params = app( '\Aimeos\Shop\Base\Page' )->getSections( 'checkout-update' ); |
|
55 | + $params = app('\Aimeos\Shop\Base\Page')->getSections('checkout-update'); |
|
56 | 56 | return \View::make('shop::checkout.update', $params); |
57 | 57 | } |
58 | 58 | } |
59 | 59 | \ No newline at end of file |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | * |
35 | 35 | * @param \Illuminate\Contracts\Config\Repository $config Configuration object |
36 | 36 | */ |
37 | - public function __construct( \Illuminate\Contracts\Config\Repository $config ) |
|
37 | + public function __construct(\Illuminate\Contracts\Config\Repository $config) |
|
38 | 38 | { |
39 | 39 | $this->config = $config; |
40 | 40 | } |
@@ -47,10 +47,10 @@ discard block |
||
47 | 47 | */ |
48 | 48 | public function get() |
49 | 49 | { |
50 | - if( $this->object === null ) |
|
50 | + if ($this->object === null) |
|
51 | 51 | { |
52 | - $extDirs = (array) $this->config->get( 'shop.extdir', array() ); |
|
53 | - $this->object = new \Aimeos\Bootstrap( $extDirs, false ); |
|
52 | + $extDirs = (array) $this->config->get('shop.extdir', array()); |
|
53 | + $this->object = new \Aimeos\Bootstrap($extDirs, false); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | return $this->object; |
@@ -64,12 +64,12 @@ discard block |
||
64 | 64 | */ |
65 | 65 | public function getVersion() |
66 | 66 | { |
67 | - if( ( $content = @file_get_contents( base_path( 'composer.lock' ) ) ) !== false |
|
68 | - && ( $content = json_decode( $content, true ) ) !== null && isset( $content['packages'] ) |
|
67 | + if (($content = @file_get_contents(base_path('composer.lock'))) !== false |
|
68 | + && ($content = json_decode($content, true)) !== null && isset($content['packages']) |
|
69 | 69 | ) { |
70 | - foreach( (array) $content['packages'] as $item ) |
|
70 | + foreach ((array) $content['packages'] as $item) |
|
71 | 71 | { |
72 | - if( $item['name'] === 'aimeos/aimeos-laravel' ) { |
|
72 | + if ($item['name'] === 'aimeos/aimeos-laravel') { |
|
73 | 73 | return $item['version']; |
74 | 74 | } |
75 | 75 | } |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/tether/1.2.0/css/tether.min.css"> |
11 | 11 | <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css"> |
12 | 12 | <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.2/css/bootstrap.min.css"> |
13 | - <link rel="stylesheet" href="<?= route( 'aimeos_shop_jqadm_file', array( 'site' => $site, 'type' => 'css' ) ); ?>"> |
|
13 | + <link rel="stylesheet" href="<?= route('aimeos_shop_jqadm_file', array('site' => $site, 'type' => 'css')); ?>"> |
|
14 | 14 | |
15 | 15 | <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> |
16 | 16 | <!--[if lt IE 9]> |
@@ -29,6 +29,6 @@ discard block |
||
29 | 29 | <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.2/js/bootstrap.min.js"></script> |
30 | 30 | <script src="//cdnjs.cloudflare.com/ajax/libs/ckeditor/4.5.4/ckeditor.js"></script> |
31 | 31 | <script src="//cdnjs.cloudflare.com/ajax/libs/ckeditor/4.5.4/adapters/jquery.js"></script> |
32 | - <script src="<?= route( 'aimeos_shop_jqadm_file', array( 'site' => $site, 'type' => 'js' ) ); ?>"></script> |
|
32 | + <script src="<?= route('aimeos_shop_jqadm_file', array('site' => $site, 'type' => 'js')); ?>"></script> |
|
33 | 33 | </body> |
34 | 34 | </html> |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | <link type="text/css" rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/extjs/3.4.1-1/resources/css/ext-all.css" /> |
10 | 10 | <link type="text/css" rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/extjs/3.4.1-1/resources/css/xtheme-gray.css" /> |
11 | 11 | @foreach ($cssFiles as $cssFile) |
12 | - <link rel="stylesheet" href="<?= asset('packages/aimeos/shop/' . $cssFile) ?>" /> |
|
12 | + <link rel="stylesheet" href="<?= asset('packages/aimeos/shop/'.$cssFile) ?>" /> |
|
13 | 13 | @endforeach |
14 | 14 | |
15 | 15 | <script type="text/javascript"> |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | |
46 | 46 | <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/extjs/3.4.1-1/adapter/ext/ext-base.js"></script> |
47 | 47 | <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/extjs/3.4.1-1/ext-all.js"></script> |
48 | - <script type="text/javascript" src="<?= route( 'aimeos_shop_extadm_file', array( 'site' => $site ) ); ?>"></script> |
|
48 | + <script type="text/javascript" src="<?= route('aimeos_shop_extadm_file', array('site' => $site)); ?>"></script> |
|
49 | 49 | |
50 | 50 | </head> |
51 | 51 | <body> |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | */ |
31 | 31 | public function indexAction() |
32 | 32 | { |
33 | - $params = app( '\Aimeos\Shop\Base\Page' )->getSections( 'account-index' ); |
|
33 | + $params = app('\Aimeos\Shop\Base\Page')->getSections('account-index'); |
|
34 | 34 | return View::make('shop::account.index', $params); |
35 | 35 | } |
36 | 36 | |
@@ -42,17 +42,17 @@ discard block |
||
42 | 42 | */ |
43 | 43 | public function downloadAction() |
44 | 44 | { |
45 | - $context = app( '\Aimeos\Shop\Base\Context' )->get(); |
|
45 | + $context = app('\Aimeos\Shop\Base\Context')->get(); |
|
46 | 46 | $langid = $context->getLocale()->getLanguageId(); |
47 | 47 | |
48 | - $view = app( '\Aimeos\Shop\Base\View' )->create( $context, array(), $langid ); |
|
49 | - $context->setView( $view ); |
|
48 | + $view = app('\Aimeos\Shop\Base\View')->create($context, array(), $langid); |
|
49 | + $context->setView($view); |
|
50 | 50 | |
51 | - $client = \Aimeos\Client\Html\Factory::createClient( $context, array(), 'account/download' ); |
|
52 | - $client->setView( $view ); |
|
51 | + $client = \Aimeos\Client\Html\Factory::createClient($context, array(), 'account/download'); |
|
52 | + $client->setView($view); |
|
53 | 53 | $client->process(); |
54 | 54 | |
55 | 55 | $response = $view->response(); |
56 | - return Response::make( (string) $response->getBody(), $response->getStatusCode(), $response->getHeaders() ); |
|
56 | + return Response::make((string) $response->getBody(), $response->getStatusCode(), $response->getHeaders()); |
|
57 | 57 | } |
58 | 58 | } |
59 | 59 | \ No newline at end of file |
@@ -36,20 +36,20 @@ |
||
36 | 36 | * @param \Illuminate\Http\Request $request Laravel request object |
37 | 37 | * @return \Illuminate\Contracts\View\View View for rendering the output |
38 | 38 | */ |
39 | - public function indexAction( Request $request ) |
|
39 | + public function indexAction(Request $request) |
|
40 | 40 | { |
41 | - if( config( 'shop.authorize', true ) && ( Auth::check() === false |
|
42 | - || $request->user()->can( 'admin', ['admin', 'editor'] ) ) === false |
|
41 | + if (config('shop.authorize', true) && (Auth::check() === false |
|
42 | + || $request->user()->can('admin', ['admin', 'editor'])) === false |
|
43 | 43 | ) { |
44 | - return View::make( 'shop::admin.index' ); |
|
44 | + return View::make('shop::admin.index'); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | $param = array( |
48 | 48 | 'resource' => 'dashboard', |
49 | - 'site' => Route::input( 'site', Input::get( 'site', 'default' ) ), |
|
50 | - 'lang' => Route::input( 'lang', Input::get( 'lang', config( 'app.locale', 'en' ) ) ) |
|
49 | + 'site' => Route::input('site', Input::get('site', 'default')), |
|
50 | + 'lang' => Route::input('lang', Input::get('lang', config('app.locale', 'en'))) |
|
51 | 51 | ); |
52 | 52 | |
53 | - return redirect()->route( 'aimeos_shop_jqadm_search', $param ); |
|
53 | + return redirect()->route('aimeos_shop_jqadm_search', $param); |
|
54 | 54 | } |
55 | 55 | } |