/** * * @param type $atts * @param type $content * @param type $tag * @return type */ public function render($atts, $content, $tag) { $atts = new JObject($atts); $html = new ZtShortcodesHtml(); $html->set('attributes', $atts); $html->set('content', $content); $html->set('tag', $tag); return $html->fetch('Shortcodes://html/site/' . $tag . '.php'); }
/** * Service for backend request */ public function onAfterRoute() { $jinput = JFactory::getApplication()->input; if ($task = $jinput->get('ztshortcodes_task')) { $view = $jinput->get('ztshortcodes_view'); $html = new ZtShortcodesHtml(); $buffer = $html->fetch('Shortcodes://html/admin/' . $view . '.php'); echo $buffer; exit; } }