Documentation

HighloadBlockLangTable

HighloadBlockLangTable class for handling table with language-dependant parameters for highload blocks.

Class methods

MethodDescription Available from version
getMapReturns list of fields for the table with language-dependant parameters of highload block.
getTableNameReturns name of language-dependant parameters of highload blocks.
validateLidReturns validator for the field LID.
validateNameReturns validator for the field NAME.

In addition to handling of the class using D7 rules, you can get language-dependant parameters for highload block as follows:

$res = \Bitrix\Highloadblock\HighloadBlockTable::getList(array(
            'select' => array('*', 'NAME_LANG' => 'LANG.NAME'),
            'order' => array('NAME_LANG' => 'ASC', 'NAME' => 'ASC')
    ));
while ($row = $res->fetch())
{
    if ($row['NAME_LANG'] != '')
    {
        echo $row['NAME_LANG'];//language-dependant name exist
    }
    else
    {
        echo $row['NAME'];//language-dependant name doesn't exist
    }
}


© «Bitrix24», 2001-2024
Up