You are here

public function PrintableFormatBase::setContent in Printer and PDF versions for Drupal 8+ 2.x

Same name and namespace in other branches
  1. 8 src/Plugin/PrintableFormatBase.php \Drupal\printable\Plugin\PrintableFormatBase::setContent()

Set the content for the printable response.

Parameters

array $content: A render array of the content to be output by the printable format.

Overrides PrintableFormatInterface::setContent

File

src/Plugin/PrintableFormatBase.php, line 138

Class

PrintableFormatBase
Provides a base class for Filter plugins.

Namespace

Drupal\printable\Plugin

Code

public function setContent(array $content) {
  $this->content = $content;
  $this->footerContent = NULL;
  if ($this->configFactory
    ->get('printable.settings')
    ->get('list_attribute')) {
    $this->footerContent = $this->linkExtractor
      ->listAttribute((string) render($this->content));
  }
}