You are here

public function FrxEmailMerge::scrapeConfig in Forena Reports 7.5

Default method for extracting configuration information from the template. This just scrapes teh current child html as the template.

Overrides RendererBase::scrapeConfig

File

src/Renderer/FrxEmailMerge.php, line 17
FrxEmailMerge Email merge template.

Class

FrxEmailMerge

Namespace

Drupal\forena\Renderer

Code

public function scrapeConfig() {
  $config = array();
  $config['class'] = get_class($this);
  $config['from'] = html_entity_decode($this
    ->extractXPathInnerHTML("*//*[@class='email-header-from']", $this->reportDocDomNode));
  $config['to'] = html_entity_decode($this
    ->extractXPathInnerHTML("*//*[@class='email-header-to']", $this->reportDocDomNode));
  $config['cc'] = html_entity_decode($this
    ->extractXPathInnerHTML("*//*[@class='email-header-cc']", $this->reportDocDomNode));
  $config['bcc'] = html_entity_decode($this
    ->extractXPathInnerHTML("*//*[@class='email-header-bcc']", $this->reportDocDomNode));
  $config['subject'] = $this
    ->extractXPathInnerHTML("*//*[@class='email-header-subject']", $this->reportDocDomNode);
  $config['body']['value'] = $this
    ->extractXPathInnerHTML("*//*[@class='email-body']", $this->reportDocDomNode);
  return $config;
}