- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/lib/webform/embed/config.php
- Класс: Bitrix\Crm\WebForm\Embed\Config
- Вызов: Config::toArray
public function toArray()
{
$data = $this->form->get();
return [
'id' => $data['ID'],
'sec' => $data['SECURITY_CODE'],
'lang' => $this->form->getLanguageId(),
'address' => Main\Web\WebPacker\Builder::getDefaultSiteUri(),
'views' => $this->getViews(),
'data' => [
'language' => $this->form->getLanguageId(),
'design' => $this->getDesign(),
'title' => $data['CAPTION'],
'desc' => $this->getDescription(),
'buttonCaption' => $data['BUTTON_CAPTION'],
'useSign' => $data['COPYRIGHT_REMOVED'] !== 'Y' || !WebForm\Form::canRemoveCopyright(),
'date' => [
'dateFormat' => Main\Context::getCurrent()->getCulture()->getDateFormat(),
'dateTimeFormat' => Main\Context::getCurrent()->getCulture()->getDateTimeFormat(),
'sundayFirstly' => Main\Context::getCurrent()->getCulture()->getWeekStart() == 0,
],
'currency' => $this->getCurrency(),
'fields' => $this->getFields(),
'agreements' => $this->getAgreements(),
'dependencies' => $this->getDependencies(),
'recaptcha' => [
'use' => $this->form->isUsedCaptcha()
],
]
];
}