static public function getItemTranslationsForCatalog($nb_catalog, int $level)
    {
        $nb_catalog_id = nb_getMixedValue($nb_catalog, NABU_CATALOG_FIELD_ID);
        if (is_numeric($nb_catalog_id)) {
            $retval = CNabuCatalogItemLanguage::buildObjectListFromSQL(
                null,
                'SELECT cil.*
                   FROM nb_catalog_item ci, nb_catalog_item_lang cil
                  WHERE ci.nb_catalog_item_id=cil.nb_catalog_item_id
                    AND ci.nb_catalog_id=%catalog_id$d '
                 . ($level > 0 ? 'and ci.nb_catalog_item_level<=%level$d ' : '')
               . 'ORDER BY ci.nb_catalog_item_order, cil.nb_language_id',
                array(
                    'catalog_id' => $nb_catalog_id,
                    'level' => $level
                )
            );
        } else {
            $retval = new CNabuCatalogItemLanguageList();
        }

        return $retval;
    }
static public function getItemTranslationsForCatalog($nb_catalog, int $level)
    {
        $nb_catalog_id = nb_getMixedValue($nb_catalog, NABU_CATALOG_FIELD_ID);
        if (is_numeric($nb_catalog_id)) {
            $retval = CNabuCatalogItemLanguage::buildObjectListFromSQL(
                null,
                'SELECT cil.*
                   FROM nb_catalog_item ci, nb_catalog_item_lang cil
                  WHERE ci.nb_catalog_item_id=cil.nb_catalog_item_id
                    AND ci.nb_catalog_id=%catalog_id$d '
                 . ($level > 0 ? 'and ci.nb_catalog_item_level<=%level$d ' : '')
               . 'ORDER BY ci.nb_catalog_item_order, cil.nb_language_id',
                array(
                    'catalog_id' => $nb_catalog_id,
                    'level' => $level
                )
            );
        } else {
            $retval = new CNabuCatalogItemLanguageList();
        }

        return $retval;
    }
static public function getItemTranslationsForCatalog ( $ nb_catalog , int $ level ) { $ nb_catalog_id = nb_getMixedValue ( $ nb_catalog , NABU_CATALOG_FIELD_ID ) ; if ( is_numeric ( $ nb_catalog_id ) ) { $ retval = CNabuCatalogItemLanguage :: buildObjectListFromSQL ( null , 'SELECT cil.*
                   FROM nb_catalog_item ci, nb_catalog_item_lang cil
                  WHERE ci.nb_catalog_item_id=cil.nb_catalog_item_id
                    AND ci.nb_catalog_id=%catalog_id$d ' . ( $ level > 0 ? 'and ci.nb_catalog_item_level<=%level$d ' : '' ) . 'ORDER BY ci.nb_catalog_item_order, cil.nb_language_id' , array ( 'catalog_id' => $ nb_catalog_id , 'level' => $ level ) ) ; } else { $ retval = new CNabuCatalogItemLanguageList ( ) ; } return $ retval ; }
Gets the list of translations associated to all items of a catalog from the storage.
@param mixed $nb_catalog A CNabuDataObject instance containing a field name nb_catalog_id or a Catalog ID.
@param int $level Max deep level to retrieve items. If $level is 0 then retrieves all levels.
@return CNabuCatalogItemLanguageList Returns a CNabuCatalogItemLanguageList with all translations found.
If no translations found, then rturns an empty instance.
Gets the list of translations associated to all items of a catalog from the storage .