template_service = $template_service; } /** * @param string $username * * @return string */ public function render_header( $username = '' ) { $model = array( 'greetings' => sprintf( __( 'Dear %s,', 'wpml-translation-management' ), $username ), ); return $this->template_service->show( $model, self::HEADER_TEMPLATE ); } /** * @param string $username * * @return string */ public function render_casual_header( $first_name = '' ) { $model = array( 'greetings' => sprintf( __( 'Hi %s,', 'wpml-translation-management' ), $first_name ), ); return $this->template_service->show( $model, self::HEADER_TEMPLATE ); } /** * @param string $bottom_text * * @return string */ protected function render_email_footer( $bottom_text = '' ) { $site_url = get_bloginfo( 'url' ); $model = array( 'bottom_text' => $bottom_text, 'wpml_footer' => sprintf( esc_html__( 'Generated by WPML plugin, running on %s.', 'wpml-translation-management' ), '' . $site_url . '' ), ); return $this->template_service->show( $model, self::FOOTER_TEMPLATE ); } }