• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/classes/general/im_message_param.php
  • Класс: CIMMessageParamAttach
  • Вызов: CIMMessageParamAttach::GetTextForIndex
static function GetTextForIndex($attach) : array
{
	if($attach instanceof CIMMessageParamAttach)
	{
		$attach = $attach->GetArray();
	}
	$textNodes = [];
	array_walk_recursive($attach, function($item, $key) use(&$textNodes){
		if(in_array($key, self::TEXT_NODES_NAMES))
		{
			$textNodes[] = $item;
		}
	});

	return $textNodes;
}