Aimeos\Shop\Controller\JqadmController::createClient PHP Method

createClient() protected method

Returns the resource controller
protected createClient ( ) : Aimeos\Admin\JQAdm\Iface
return Aimeos\Admin\JQAdm\Iface JQAdm client
    protected function createClient()
    {
        $site = Route::input('site', Input::get('site', 'default'));
        $lang = Input::get('lang', config('app.locale', 'en'));
        $resource = Route::input('resource');
        $aimeos = app('\\Aimeos\\Shop\\Base\\Aimeos')->get();
        $templatePaths = $aimeos->getCustomPaths('admin/jqadm/templates');
        $context = app('\\Aimeos\\Shop\\Base\\Context')->get(false, 'backend');
        $context->setI18n(app('\\Aimeos\\Shop\\Base\\I18n')->get(array($lang, 'en')));
        $context->setLocale(app('\\Aimeos\\Shop\\Base\\Locale')->getBackend($context, $site));
        $context->setView(app('\\Aimeos\\Shop\\Base\\View')->create($context, $templatePaths, $lang));
        return \Aimeos\Admin\JQAdm\Factory::createClient($context, $templatePaths, $resource);
    }