/**
  * Utility method for child classes to get the contents of a template file and return
  *
  * We're assuming the child messenger class has already setup template args!
  * @param  bool $preview if true we use the preview wrapper otherwise we use main wrapper.
  * @return string
  * @throws \EE_Error
  */
 protected function _get_main_template($preview = FALSE)
 {
     $type = $preview ? 'preview' : 'main';
     $wrapper_template = $this->_tmp_pack->get_wrapper($this->name, $type);
     //check file exists and is readable
     if (!is_readable($wrapper_template)) {
         throw new EE_Error(sprintf(__('Unable to access the template file for the %s messenger main content wrapper.  The location being attempted is %s.', 'event_espresso'), ucwords($this->label['singular']), $wrapper_template));
     }
     //add message type to template args
     $this->_template_args['message_type'] = $this->_incoming_message_type;
     //require template helper
     EE_Registry::instance()->load_helper('Template');
     return EEH_Template::display_template($wrapper_template, $this->_template_args, TRUE);
 }
 public function add_html_css($variation_path, EE_Messages_Template_Pack $template_pack, $messenger_name, $message_type_name, $url, $type, $variation, $skip_filters)
 {
     $variation = $template_pack->get_variation($this->name, $message_type_name, $type, $variation, $url, '.css', $skip_filters);
     return $variation;
 }