You are here

protected function SimplenewsSourceNode::getFooterWithFormat in Simplenews 7

Get the footer in the specified format.

Parameters

$format: Either html or plain.

Return value

The footer for the requested format.

2 calls to SimplenewsSourceNode::getFooterWithFormat()
SimplenewsSourceNode::getFooter in includes/simplenews.source.inc
Implements SimplenewsSourceInterface::getFooter().
SimplenewsSourceNode::getPlainFooter in includes/simplenews.source.inc
Implements SimplenewsSourceInterface::getPlainFooter().

File

includes/simplenews.source.inc, line 790
Contains SimplenewsSource interface and implementations.

Class

SimplenewsSourceNode
Simplenews source implementation based on nodes for a single subscriber.

Code

protected function getFooterWithFormat($format) {

  // Switch to correct user and language context.
  $this
    ->setContext();
  if ($cache = $this->cache
    ->get('final', 'footer:' . $format)) {
    return $cache;
  }
  $final_footer = token_replace($this
    ->buildFooter($format), $this
    ->getTokenContext(), array(
    'sanitize' => FALSE,
  ));
  $this->cache
    ->set('final', 'footer:' . $format, $final_footer);
  $this
    ->resetContext();
  return $final_footer;
}