public function renderOptions(XenForo_ViewRenderer_Abstract $viewRenderer, array &$templateParams)
 {
     $templateParams['namePrefix'] = self::getNamePrefix();
     $templateParams['options_loaded'] = get_class($this);
     $templateParams['options'] = !empty($templateParams['widget']['options']) ? $templateParams['widget']['options'] : array();
     $templateParams['rendererConfiguration'] = $this->getConfiguration();
     if ($this->_getOptionsTemplate()) {
         $optionsTemplate = $viewRenderer->createTemplateObject($this->_getOptionsTemplate(), $templateParams);
         $this->_renderOptions($optionsTemplate);
         $templateParams['optionsRendered'] = $optionsTemplate->render();
     }
 }
示例#2
0
 /**
  * Creates an HTML template object for rendering using the view renderer.
  *
  * @param string Name of the template to create
  * @param array  Key-value parameters to pass to the template
  *
  * @return XenForo_Template_Abstract
  */
 public function createTemplateObject($templateName, array $params = array())
 {
     return $this->_renderer->createTemplateObject($templateName, $params);
 }