Form::configure

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. Form
  4. configure
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/ui/webpack/form.php
  • Класс: Bitrix\Crm\UI\Webpack\Form
  • Вызов: Form::configure
public function configure()
{
	if (!$this->form)
	{
		$this->form = new WebForm\Form($this->getId());
	}

	$data = $this->form->get();
	$isCloud = Loader::includeModule('bitrix24');

	$this->fileDir = 'form';
	$this->fileName = str_replace(
		['#id#', '#sec#'],
		[$this->getId(), $data['SECURITY_CODE']],
		$isCloud ? 'loader_#id#.js' : 'loader_#id#_#sec#.js'
	);

	$name = 'crm.site.form.embed.unit';
	$this->addExtension($name);
	$module = $this->getModule($name);
	$module->getProfile()->setCallParameter($this->getCallParameter());

	$this->embeddedModuleName = 'crm.site.form.unit.loader';
}

Добавить комментарий