You are here

private function TCPDFDrupal::DrupalGenRunningSection in TCPDF 8

Generates a header or footer for the pdf document.

Parameters

array $container:

Return value

FALSE if the container did not store any useful information to generate the document.

See also

DrupalInitialize()

2 calls to TCPDFDrupal::DrupalGenRunningSection()
TCPDFDrupal::Footer in src/TCPDFDrupal.php
Sets the footer of the document.
TCPDFDrupal::Header in src/TCPDFDrupal.php
Sets the header of the document.

File

src/TCPDFDrupal.php, line 118
Contains \TCPDF\TCPDFDrupal.

Class

TCPDFDrupal
Do not create a new instance of this class manually. Use tcpdf_get_instance().

Namespace

Drupal\tcpdf

Code

private function DrupalGenRunningSection($container) {
  if (!empty($container['html'])) {
    $this
      ->writeHTML($container['html']);
    return TRUE;
  }
  elseif (!empty($container['callback'])) {
    $that =& $this;
    if (is_array($container['callback'])) {
      if (function_exists($container['callback']['function'])) {
        call_user_func($container['callback']['function'], $that, $container['callback']['context']);
      }
    }
    elseif (function_exists($container['callback'])) {
      call_user_func($container['callback'], $that);
    }
    return TRUE;
  }
  return FALSE;
}