ResourceBooking::getSettingsHTML

  1. Bitrix24 API (v. 23.675.0)
  2. calendar
  3. ResourceBooking
  4. getSettingsHTML
  • Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/userfield/resourcebooking.php
  • Класс: BitrixCalendarUserFieldResourceBooking
  • Вызов: ResourceBooking::getSettingsHTML
function getSettingsHTML($userField = false, $htmlControl = [], $varsFromForm = false)
{
	BitrixMainUIExtension::load(['uf', 'calendar.resourcebookinguserfield', 'calendar_planner', 'socnetlogdest', 'helper', 'main', 'ui', 'ui.selector']);

	if($varsFromForm)
	{
		$settingsValue = $GLOBALS[$htmlControl["NAME"]];
	}
	elseif(is_array($userField))
	{
		$settingsValue = $userField["SETTINGS"];
	}
	else
	{
		$settingsValue = [];
	}

	$controlId = $userField['FIELD_NAME'].'_'.rand();
	$params = [
		'controlId' => $controlId,
		'settings' => $settingsValue,
		'userField' => $userField,
		'htmlControl' => $htmlControl,
		'outerWrapId' => $controlId.'-settings-outer-wrap',
		'formName' => 'post_form'
	];

	if ($settingsValue['USE_USERS'] === 'Y')
	{
		$params['socnetDestination'] = CCalendar::getSocNetDestination(false, [], $settingsValue['SELECTED_USERS']);
	}

	$result = '
		
		
			
'; return $result; }

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