Workgroup::getTypeByCode

  1. Bitrix24 API (v. 23.675.0)
  2. socialnetwork
  3. Workgroup
  4. getTypeByCode
  • Модуль: socialnetwork
  • Путь к файлу: ~/bitrix/modules/socialnetwork/lib/helper/workgroup.php
  • Класс: Bitrix\Socialnetwork\Helper\Workgroup
  • Вызов: Workgroup::getTypeByCode
static function getTypeByCode($params = [])
{
	$result = false;

	if (
		!is_array($params)
		|| empty($params['code'])
	)
	{
		return $result;
	}

	$code = $params['code'];
	$typesList = (
		!empty($params['typesList'])
			? $params['typesList']
			: self::getTypes($params)
	);

	if (
		!empty($typesList)
		&& is_array($typesList)
		&& !empty($typesList[$code])
	)
	{
		$result = $typesList[$code];
	}

	return $result;
}

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