• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/discount/preset/basepreset.php
  • Класс: BitrixSaleDiscountPresetBasePreset
  • Вызов: BasePreset::processSaveInputNameInternal
protected function processSaveInputNameInternal(State $state, $nextStep)
{
	if(!trim($state->get('discount_name')))
	{
		$this->errorCollection[] = new Error(Loc::getMessage('SALE_BASE_PRESET_ERROR_EMPTY_NAME'));
	}

	if(!trim($state->get('discount_lid')))
	{
		$this->errorCollection[] = new Error(Loc::getMessage('SALE_BASE_PRESET_ERROR_EMPTY_LID'));
	}

	if(!$this->errorCollection->isEmpty())
	{
		return array($state, 'InputName');
	}

	return array($state, $nextStep);
}