| @@ 176-191 (lines=16) @@ | ||
| 173 | * |
|
| 174 | * @return \Aimeos\Admin\JQAdm\Iface JQAdm client |
|
| 175 | */ |
|
| 176 | protected function createClient() |
|
| 177 | { |
|
| 178 | $site = Route::input( 'site', Input::get( 'site', 'default' ) ); |
|
| 179 | $lang = Input::get( 'lang', config( 'app.locale', 'en' ) ); |
|
| 180 | $resource = Route::input( 'resource' ); |
|
| 181 | ||
| 182 | $aimeos = app( '\Aimeos\Shop\Base\Aimeos' )->get(); |
|
| 183 | $templatePaths = $aimeos->getCustomPaths( 'admin/jqadm/templates' ); |
|
| 184 | ||
| 185 | $context = app( '\Aimeos\Shop\Base\Context' )->get( false, 'backend' ); |
|
| 186 | $context->setI18n( app('\Aimeos\Shop\Base\I18n')->get( array( $lang, 'en' ) ) ); |
|
| 187 | $context->setLocale( app('\Aimeos\Shop\Base\Locale')->getBackend( $context, $site ) ); |
|
| 188 | $context->setView( app( '\Aimeos\Shop\Base\View' )->create( $context->getConfig(), $templatePaths, $lang ) ); |
|
| 189 | ||
| 190 | return \Aimeos\Admin\JQAdm\Factory::createClient( $context, $templatePaths, $resource ); |
|
| 191 | } |
|
| 192 | ||
| 193 | ||
| 194 | /** |
|
| @@ 169-184 (lines=16) @@ | ||
| 166 | * |
|
| 167 | * @return \Aimeos\Admin\JsonAdm\Iface JsonAdm client |
|
| 168 | */ |
|
| 169 | protected function createClient() |
|
| 170 | { |
|
| 171 | $site = Route::input( 'site', Input::get( 'site', 'default' ) ); |
|
| 172 | $lang = Input::get( 'lang', config( 'app.locale', 'en' ) ); |
|
| 173 | $resource = Route::input( 'resource' ); |
|
| 174 | ||
| 175 | $aimeos = app( '\Aimeos\Shop\Base\Aimeos' )->get(); |
|
| 176 | $templatePaths = $aimeos->getCustomPaths( 'admin/jsonadm/templates' ); |
|
| 177 | ||
| 178 | $context = app( '\Aimeos\Shop\Base\Context' )->get( false, 'backend' ); |
|
| 179 | $context->setI18n( app('\Aimeos\Shop\Base\I18n')->get( array( $lang, 'en' ) ) ); |
|
| 180 | $context->setLocale( app('\Aimeos\Shop\Base\Locale')->getBackend( $context, $site ) ); |
|
| 181 | $context->setView( app( '\Aimeos\Shop\Base\View' )->create( $context->getConfig(), $templatePaths, $lang ) ); |
|
| 182 | ||
| 183 | return \Aimeos\Admin\JsonAdm\Factory::createClient( $context, $templatePaths, $resource ); |
|
| 184 | } |
|
| 185 | ||
| 186 | ||
| 187 | /** |
|