Dictionary::toArray

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. Dictionary
  4. toArray
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/webform/options/dictionary.php
  • Класс: Bitrix\Crm\WebForm\Options\Dictionary
  • Вызов: Dictionary::toArray
public function toArray(): array
{
	return [
		'languages' => $this->getLanguages(),
		'views' => $this->getViews(),
		'catalog' => [
			'id' => \CAllCrmCatalog::EnsureDefaultExists(),
			'currencies' => $this->getCurrencies(),
		],
		'payment' => $this->getPayment(),
		'document' => $this->getDocument(),
		'callback' => $this->getCallback(),
		'whatsapp' => $this->getWhatsApp(),
		'captcha' => $this->getCaptcha(),
		'templates' => [],
		'personalization' => $this->getPersonalization(),
		'properties' => $this->getProperties(),
		'deps' => $this->getDeps(),
		'sign' => $this->getSign(),
		'restriction' => $this->getRestriction(),
		'product' => [
			'isCloud' => Crm\Integration\Bitrix24\Product::isCloud(),
			'isRegionRussian' => Crm\Integration\Bitrix24\Product::isRegionRussian(),
		],
		'contentTypes' => [
			['id' => 'image/*', 'name' => Loc::getMessage('CRM_WEBFORM_OPTIONS_DICT_FIELD_FILE_CONTENT_TYPE_IMAGE')],
			[
				'id' => 'x-bx/doc',
				'name' => Loc::getMessage('CRM_WEBFORM_OPTIONS_DICT_FIELD_FILE_CONTENT_TYPE_DOC_MSGVER_1'),
				'hint' => Loc::getMessage('CRM_WEBFORM_OPTIONS_DICT_FIELD_FILE_CONTENT_TYPE_DOC_HINT'),
			],
			[
				'id' => 'x-bx/arc',
				'name' => Loc::getMessage('CRM_WEBFORM_OPTIONS_DICT_FIELD_FILE_CONTENT_TYPE_ARCHIVE'),
				'hint' => Loc::getMessage('CRM_WEBFORM_OPTIONS_DICT_FIELD_FILE_CONTENT_TYPE_ARCHIVE_HINT'),
			],
			['id' => 'audio/*', 'name' => Loc::getMessage('CRM_WEBFORM_OPTIONS_DICT_FIELD_FILE_CONTENT_TYPE_AUDIO')],
			['id' => 'video/*', 'name' => Loc::getMessage('CRM_WEBFORM_OPTIONS_DICT_FIELD_FILE_CONTENT_TYPE_VIDEO')],
		],
		'defaultMaxFileFieldSizeMbValue' => Main\Config\Option::get('crm', '~webform_default_max_file_field_size_mb', 1000),
		'dailyFileLimitSizeMbValue' => WebForm\Limitations\DailyFileUploadLimit::instance()->getLimit(),
		'integration' => $this->getIntegration(),
		'scenarios' => Main\DI\ServiceLocator::getInstance()->get('crm.service.webform.scenario')->getScenarioList(),
		'scenarioCategories' => Main\DI\ServiceLocator::getInstance()->get('crm.service.webform.scenario')->getScenarioCategoryList(),
		'sidebarButtons' => Main\DI\ServiceLocator::getInstance()->get('crm.service.webform.scenario')->getSidebarMenuItems(),
	];
}

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