示例#1
0
 /**
  * Returns the HTML output from a template, but doesn't render it
  *
  * @param string $template the template name
  * @param array $params template parameters
  *
  * @return boolean
  */
 public static function returnTemplateHTML($template, $params = array())
 {
     $current_content = ob_get_clean();
     ob_start('mb_output_handler');
     echo \caspar\core\Components::includeTemplate($template, $params);
     $template_content = ob_get_clean();
     ob_start('mb_output_handler');
     echo $current_content;
     return $template_content;
 }
示例#2
0
/**
 * Includes a 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 include_component($component, $params = array())
{
    return \caspar\core\Components::includeComponent($component, $params);
}