<?php

use KupShop\ConvertorsBundle\Utils\ConvertorsUtil;
use KupShop\KupShopBundle\Util\Compat\ServiceContainer;

function smarty_function_get_size_table($params, &$smarty)
{
    $convertorsUtil = ServiceContainer::getService(ConvertorsUtil::class);
    $result = $convertorsUtil->getSizeTable($params);

    if (!empty($params['assign'])) {
        $smarty->assign($params['assign'], $result);
    } else {
        return $result;
    }
}
