You are here

private function TCPDFDrupal::DrupalGenRunningSection in TCPDF 7

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 ./tcpdf.class.inc
Sets the footer of the document.
TCPDFDrupal::Header in ./tcpdf.class.inc
Sets the header of the document.

File

./tcpdf.class.inc, line 110
Contains \TCPDF\TCPDFDrupal.

Class

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

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;
}