Aimeos\Shop\Controller\ExtadmController::getJsonLanguages PHP Method

getJsonLanguages() protected method

Creates a list of all available translations.
protected getJsonLanguages ( Aimeos\MShop\Context\Item\Iface $context ) : array
$context Aimeos\MShop\Context\Item\Iface Context object
return array List of language IDs with labels
    protected function getJsonLanguages(\Aimeos\MShop\Context\Item\Iface $context)
    {
        $result = array();
        foreach (app('\\Aimeos\\Shop\\Base\\Aimeos')->get()->getI18nList('admin') as $id) {
            $result[] = array('id' => $id, 'label' => $id);
        }
        return json_encode($result);
    }