/** * Returns the requested flash variable depending on the setting in the banner. * If no value is set in the banner object, the default value from TS setting * is returned * * @param \DERHANSEN\SfBanners\Domain\Model\Banner $banner The banner * @param string $flashSetting Flash settings * @return string */ public function render($banner = null, $flashSetting = '') { $settings = $this->templateVariableContainer->get('settings'); $retVal = ''; switch ($flashSetting) { case 'wmode': if ($banner->getFlashWmode() != '') { $retVal = $banner->getFlashWmode(); } else { $retVal = $settings['defaultFlashVars']['wmode']; } break; case 'allowScriptAccess': if ($banner->getFlashAllowScriptAccess() != '') { $retVal = $banner->getFlashAllowScriptAccess(); } else { $retVal = $settings['defaultFlashVars']['allowScriptAccess']; } break; default: } return $retVal; }