/** * Renders style and apply language file to it if that file exists * @param null $style_name - Style name to render * @throws GenericException - Throws if style name is not defined * @throws PropertyAlreadyExistsException - Throws if 'lang' property as already set */ public function renderStyle($style_name = null) { if ($this->templateName) { $template_name_to_render = $this->templateName; } else { if ($style_name) { $template_name_to_render = $style_name; } else { throw new GenericException('View template is not defined'); } } $this->templateName = $template_name_to_render; $this->add('lang', Helpers::get_current_lang_style_translation($template_name_to_render)); $this->viewRederer->renderStyle($template_name_to_render, $this->getProperties()); }