protected getJsonLanguages ( Aimeos\MShop\Context\Item\Iface $context ) : array | ||
$context | Aimeos\MShop\Context\Item\Iface | Context object |
Résultat | 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);
}