| @@ 157-171 (lines=15) @@ | ||
| 154 | * @param string $sitecode Unique site code | |
| 155 | * @return \Aimeos\MShop\Context\Item\Iface Context item | |
| 156 | */ | |
| 157 | protected function createClient( $sitecode, $resource ) | |
| 158 | 	{ | |
| 159 | $lang = \Input::get( 'lang', config( 'app.locale', 'en' ) ); | |
| 160 | ||
| 161 | $aimeos = app( '\Aimeos\Shop\Base\Aimeos' )->get(); | |
| 162 | $templatePaths = $aimeos->getCustomPaths( 'controller/jqadm/templates' ); | |
| 163 | ||
| 164 | $context = app( '\Aimeos\Shop\Base\Context' )->get( false ); | |
| 165 | $context = $this->setLocale( $context, $sitecode, $lang ); | |
| 166 | ||
| 167 | $view = app( '\Aimeos\Shop\Base\View' )->create( $context->getConfig(), $templatePaths, $lang ); | |
| 168 | $context->setView( $view ); | |
| 169 | ||
| 170 | return \Aimeos\Client\JQAdm\Factory::createClient( $context, $templatePaths, $resource ); | |
| 171 | } | |
| 172 | ||
| 173 | ||
| 174 | /** | |
| @@ 184-198 (lines=15) @@ | ||
| 181 | * @param string $sitecode Unique site code | |
| 182 | * @return \Aimeos\MShop\Context\Item\Iface Context item | |
| 183 | */ | |
| 184 | protected function createController( $sitecode, $resource ) | |
| 185 | 	{ | |
| 186 | $lang = \Input::get( 'lang', config( 'app.locale', 'en' ) ); | |
| 187 | ||
| 188 | $aimeos = app( '\Aimeos\Shop\Base\Aimeos' )->get(); | |
| 189 | $templatePaths = $aimeos->getCustomPaths( 'controller/jsonadm/templates' ); | |
| 190 | ||
| 191 | $context = app( '\Aimeos\Shop\Base\Context' )->get( false ); | |
| 192 | $context = $this->setLocale( $context, $sitecode, $lang ); | |
| 193 | ||
| 194 | $view = app( '\Aimeos\Shop\Base\View' )->create( $context->getConfig(), $templatePaths, $lang ); | |
| 195 | $context->setView( $view ); | |
| 196 | ||
| 197 | return \Aimeos\Controller\JsonAdm\Factory::createController( $context, $templatePaths, $resource ); | |
| 198 | } | |
| 199 | ||
| 200 | ||
| 201 | /** | |