Esempio n. 1
0
 public static function getHtmlSelect($brand = null, $selected = 0, $name = 'car_model')
 {
     $arGetList = array('select' => array('ID' => 'VALUE', 'NAME'), 'filter' => array('ACTIVE' => true), 'order' => array('SORT' => 'ASC', 'NAME' => 'ASC'));
     if (!is_null($brand)) {
         $arGetList['filter']['BRANDS_ID'] = intval($brand);
     }
     $arValues = CarModelTable::getList($arGetList);
     if ($selected > 0) {
         return SelectBox($name, $arValues, '-- Выбрать --', $selected);
     } else {
         return SelectBox($name, $arValues, '-- Выбрать --');
     }
 }