protected function _parse_mention($matches) { $user = TBGUsersTable::getTable()->getByUsername($matches[1]); if ($user instanceof TBGUser) { $output = TBGAction::returnComponentHTML('main/userdropdown', array('user' => $matches[1], 'displayname' => $matches[0])); $this->mentions[$user->getID()] = $user; } else { $output = $matches[0]; } return $output; }
/** * Return a rendered component with specified parameters * * @param string $component name of component to load, or module/component to load * @param array $params key => value pairs of parameters for the template */ function get_component_html($component, $params = array()) { return TBGAction::returnComponentHTML($component, $params); }