CCrmViewHelper::RenderUserSearch

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmViewHelper
  4. RenderUserSearch
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_view_helper.php
  • Класс: \CCrmViewHelper
  • Вызов: CCrmViewHelper::RenderUserSearch
static function RenderUserSearch($ID, $searchInputID, $dataInputID, $componentName, $siteID = '', $nameFormat = '', $delay = 0, array $options = null)
{
	CCrmComponentHelper::RegisterScriptLink('/bitrix/js/crm/common.js');

	if(!is_array($options))
	{
		$options = array();
	}

	$ID = strval($ID);
	$searchInputID = strval($searchInputID);
	$dataInputID = strval($dataInputID);
	$componentName = strval($componentName);

	$siteID = strval($siteID);
	if($siteID === '')
	{
		$siteID = SITE_ID;
	}

	$nameFormat = strval($nameFormat);
	if($nameFormat === '')
	{
		$nameFormat = CSite::GetNameFormat(false);
	}

	$delay = intval($delay);
	if($delay < 0)
	{
		$delay = 0;
	}

	if(!isset($options['RENDER_SEARCH_INPUT']) || $options['RENDER_SEARCH_INPUT'])
	{
		echo '';
	}

	if(!isset($options['RENDER_DATA_INPUT']) || $options['RENDER_DATA_INPUT'])
	{
		echo '';
	}

	echo '';

	$GLOBALS['APPLICATION']->IncludeComponent(
		'bitrix:intranet.user.selector.new',
		'',
		array(
			'MULTIPLE' => 'N',
			'NAME' => $componentName,
			'INPUT_NAME' => $searchInputID,
			'SHOW_EXTRANET_USERS' => 'NONE',
			'POPUP' => 'Y',
			'SITE_ID' => $siteID,
			'NAME_TEMPLATE' => $nameFormat
		),
		null,
		array('HIDE_ICONS' => 'Y')
	);
}

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