public static function create() { if (self::$_bdSocialShare_Helper_viewRenderer === null) { self::$_bdSocialShare_Helper_viewRenderer = bdSocialShare_Helper_Simulation_ViewRenderer::create(); } return new bdSocialShare_Helper_Simulation_View(self::$_bdSocialShare_Helper_viewRenderer, self::$_bdSocialShare_Helper_viewRenderer->bdSocialShare_Helper_getResponse()); }
protected function _getSimulationTemplate($templateName, array $params = array()) { static $view = null; $options = XenForo_Application::getOptions(); $viewingUser = $this->getViewingUser(); if (!empty($viewingUser['style_id'])) { bdSocialShare_Helper_Simulation_Template::$bdSocialShare_Helper_styleId = $viewingUser['style_id']; } else { bdSocialShare_Helper_Simulation_Template::$bdSocialShare_Helper_styleId = $options->get('defaultStyleId'); } if (!empty($viewingUser['language_id'])) { bdSocialShare_Helper_Simulation_Template::$bdSocialShare_Helper_languageId = $viewingUser['language_id']; } else { bdSocialShare_Helper_Simulation_Template::$bdSocialShare_Helper_languageId = $options->get('defaultLanguageId'); } bdSocialShare_Helper_Simulation_Template::$bdSocialShare_Helper_visitor = $viewingUser; if ($view === null) { $view = bdSocialShare_Helper_Simulation_View::create(); } return $view->createTemplateObject($templateName, $params); }