• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/userconsent/agreement.php
  • Класс: BitrixMainUserConsentAgreement
  • Вызов: Agreement::load
public function load($id)
{
	$this->id = null;
	if (!$id)
	{
		$this->errors->setError(new Error('Parameter `Agreement ID` required.'));
		return false;
	}

	$data = InternalsAgreementTable::getRowById($id);
	if (!$data)
	{
		$this->errors->setError(new Error("Agreement with id `$id` not found."));
		return false;
	}

	$this->data = $data;
	$this->id = $id;
	$this->intl->load($this->data['LANGUAGE_ID']);

	return true;
}