• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/call/mask.php
  • Класс: BitrixImCallMask
  • Вызов: Mask::getBaseList
static function getBaseList()
{
	$result = [
		[
			'id' => 'bear1',
			'active' => true,
		],
		[
			'id' => 'owl2',
			'active' => true,
		],
		[
			'id' => 'fox1',
			'active' => true,
		],
		[
			'id' => 'panther1',
			'active' => true,
		],
		[
			'id' => 'polebear1',
			'active' => true,
		],
		[
			'id' => 'santa2',
			'active' => true,
		],
		[
			'id' => 'bear2',
			'active' => true,
		],
		[
			'id' => 'owl1',
			'active' => true,
		],
		[
			'id' => 'fox3',
			'active' => true,
		],
		[
			'id' => 'panther2',
			'active' => true,
		],
		[
			'id' => 'polebear2',
			'active' => true,
		],
		[
			'id' => 'santa4',
			'active' => true,
		],
		[
			'id' => 'bear4',
			'active' => true,
		],
		[
			'id' => 'owl3',
			'active' => true,
		],
		[
			'id' => 'fox2',
			'active' => true,
		],
		[
			'id' => 'panther4',
			'active' => true,
		],
		[
			'id' => 'polebear4',
			'active' => true,
		],
		[
			'id' => 'santa1',
			'active' => true,
		],
		[
			'id' => 'bear3',
			'active' => true,
		],
		[
			'id' => 'fox4',
			'active' => true,
		],
		[
			'id' => 'panther3',
			'active' => true,
		],
		[
			'id' => 'polebear3',
			'active' => true,
		],
		[
			'id' => 'santa3',
			'active' => true,
		],
	];

	foreach ($result as &$value)
	{
		$value['title'] = preg_replace_callback("/(D+)(d+)/i", static function($matches){
			return Loc::getMessage('IM_CALL_MASK_' . mb_strtoupper($matches[1]) . '_' . $matches[2]);
		}, $value['id']);

		$value['preview'] = self::$path . "/" . $value['id'] . '.png';

		if ($value['active'])
		{
			$version = isset($value['version']) ? '?v' . $value['version']: '';

			$value['mask'] = self::getCdnPath(). "/" . $value['id'] . '.bam.gz' . $version;

			$value['background'] = preg_replace_callback("/(D+)(d+)/i", static function($matches){
				return self::getCdnPath() . "/" . $matches[1] . '.jpg';
			}, $value['id']);
		}
		else
		{
			$value['mask'] = '';
			$value['background'] = '';
		}
		unset($value['version']);
	}

	return $result;
}