@@ -26,48 +26,48 @@ discard block |
||
26 | 26 | * @param string|null $locale Code of the current language or null for no translation |
27 | 27 | * @return \Aimeos\MW\View\Iface View object |
28 | 28 | */ |
29 | - public function create( \Aimeos\MW\Config\Iface $config, array $templatePaths, $locale = null ) |
|
29 | + public function create(\Aimeos\MW\Config\Iface $config, array $templatePaths, $locale = null) |
|
30 | 30 | { |
31 | 31 | $params = $fixed = array(); |
32 | 32 | |
33 | - if( $locale !== null ) |
|
33 | + if ($locale !== null) |
|
34 | 34 | { |
35 | 35 | $params = \Route::current()->parameters() + \Input::all(); |
36 | 36 | $fixed = $this->getFixedParams(); |
37 | 37 | |
38 | - $i18n = app('\Aimeos\Shop\Base\I18n')->get( array( $locale ) ); |
|
38 | + $i18n = app('\Aimeos\Shop\Base\I18n')->get(array($locale)); |
|
39 | 39 | $translation = $i18n[$locale]; |
40 | 40 | } |
41 | 41 | else |
42 | 42 | { |
43 | - $translation = new \Aimeos\MW\Translation\None( 'en' ); |
|
43 | + $translation = new \Aimeos\MW\Translation\None('en'); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | |
47 | - $view = new \Aimeos\MW\View\Standard( $templatePaths ); |
|
47 | + $view = new \Aimeos\MW\View\Standard($templatePaths); |
|
48 | 48 | |
49 | - $helper = new \Aimeos\MW\View\Helper\Translate\Standard( $view, $translation ); |
|
50 | - $view->addHelper( 'translate', $helper ); |
|
49 | + $helper = new \Aimeos\MW\View\Helper\Translate\Standard($view, $translation); |
|
50 | + $view->addHelper('translate', $helper); |
|
51 | 51 | |
52 | - $helper = new \Aimeos\MW\View\Helper\Url\Laravel5( $view, app('url'), $fixed ); |
|
53 | - $view->addHelper( 'url', $helper ); |
|
52 | + $helper = new \Aimeos\MW\View\Helper\Url\Laravel5($view, app('url'), $fixed); |
|
53 | + $view->addHelper('url', $helper); |
|
54 | 54 | |
55 | - $helper = new \Aimeos\MW\View\Helper\Param\Standard( $view, $params ); |
|
56 | - $view->addHelper( 'param', $helper ); |
|
55 | + $helper = new \Aimeos\MW\View\Helper\Param\Standard($view, $params); |
|
56 | + $view->addHelper('param', $helper); |
|
57 | 57 | |
58 | - $helper = new \Aimeos\MW\View\Helper\Config\Standard( $view, $config ); |
|
59 | - $view->addHelper( 'config', $helper ); |
|
58 | + $helper = new \Aimeos\MW\View\Helper\Config\Standard($view, $config); |
|
59 | + $view->addHelper('config', $helper); |
|
60 | 60 | |
61 | - $sepDec = $config->get( 'client/html/common/format/seperatorDecimal', '.' ); |
|
62 | - $sep1000 = $config->get( 'client/html/common/format/seperator1000', ' ' ); |
|
63 | - $helper = new \Aimeos\MW\View\Helper\Number\Standard( $view, $sepDec, $sep1000 ); |
|
64 | - $view->addHelper( 'number', $helper ); |
|
61 | + $sepDec = $config->get('client/html/common/format/seperatorDecimal', '.'); |
|
62 | + $sep1000 = $config->get('client/html/common/format/seperator1000', ' '); |
|
63 | + $helper = new \Aimeos\MW\View\Helper\Number\Standard($view, $sepDec, $sep1000); |
|
64 | + $view->addHelper('number', $helper); |
|
65 | 65 | |
66 | - $helper = new \Aimeos\MW\View\Helper\Request\Laravel5( $view, \Request::instance() ); |
|
67 | - $view->addHelper( 'request', $helper ); |
|
66 | + $helper = new \Aimeos\MW\View\Helper\Request\Laravel5($view, \Request::instance()); |
|
67 | + $view->addHelper('request', $helper); |
|
68 | 68 | |
69 | - $helper = new \Aimeos\MW\View\Helper\Csrf\Standard( $view, '_token', csrf_token() ); |
|
70 | - $view->addHelper( 'csrf', $helper ); |
|
69 | + $helper = new \Aimeos\MW\View\Helper\Csrf\Standard($view, '_token', csrf_token()); |
|
70 | + $view->addHelper('csrf', $helper); |
|
71 | 71 | |
72 | 72 | return $view; |
73 | 73 | } |
@@ -82,15 +82,15 @@ discard block |
||
82 | 82 | { |
83 | 83 | $fixed = array(); |
84 | 84 | |
85 | - if( ( $value = \Route::input( 'site' ) ) !== null ) { |
|
85 | + if (($value = \Route::input('site')) !== null) { |
|
86 | 86 | $fixed['site'] = $value; |
87 | 87 | } |
88 | 88 | |
89 | - if( ( $value = \Route::input( 'locale' ) ) !== null ) { |
|
89 | + if (($value = \Route::input('locale')) !== null) { |
|
90 | 90 | $fixed['locale'] = $value; |
91 | 91 | } |
92 | 92 | |
93 | - if( ( $value = \Route::input( 'currency' ) ) !== null ) { |
|
93 | + if (($value = \Route::input('currency')) !== null) { |
|
94 | 94 | $fixed['currency'] = $value; |
95 | 95 | } |
96 | 96 |