$icon) { if (!in_array($key, CourseChatUtils::getEmojisToInclude())) { continue; } $iconList[$key] = strtoupper($icon).'.png'; } $view = new Template(get_lang('Chat'), false, false, false, true, false); $view->assign('icons', $iconList); $view->assign('emoji_strategy', CourseChatUtils::getEmojiStrategry()); $view->assign('emoji_smile', \Emojione\Emojione::toImage(':smile:')); $template = $view->get_template('chat/chat.tpl'); $content = $view->fetch($template); $view->assign('content', $content); $view->display_no_layout_template();