Teapot
Well-known member
Running into a minor problem with the new BBCode system. I've got a small class set up to deal with the BBCode, which is fine, but I'm getting stuck at how to render a template within my BBCode and, eventually, pass the options and BBCode content into it as $viewParams - the traditional way, doing something like this, no longer works because $_view is protected:
So my question is, how do I make this work? Obviously the $somethingSomething is just there as pseudocode and the code doesn't return anything yet:
PHP:
$template = $this->_view->createTemplateObject('bb_code_tag_php', array(
'content' => $content
));
So my question is, how do I make this work? Obviously the $somethingSomething is just there as pseudocode and the code doesn't return anything yet:
PHP:
<?php
class Pokecharms_BBCode_PokemonType
{
public static function render(array $tag, array $rendererStates, XenForo_BbCode_Formatter_Base $formatter)
{
$somethingSomething->createTemplateObject('type_image', array(
'content' => $tag['children'][0]
));
}
}