You are here

public static function PdfTemplate::getAvailableHyphenatePatterns in Views PDF 7

Same name and namespace in other branches
  1. 6 views_pdf_template.php \PdfTemplate::getAvailableHyphenatePatterns()
  2. 7.3 views_pdf_template.php \PdfTemplate::getAvailableHyphenatePatterns()
  3. 7.2 views_pdf_template.php \PdfTemplate::getAvailableHyphenatePatterns()

This method returns a list of hyphenation patterns, that are available.

2 calls to PdfTemplate::getAvailableHyphenatePatterns()
PdfTemplate::renderRow in ./views_pdf_template.php
views_pdf_get_hyphenations in ./views_pdf.module
This method returns all available hyphenation patterns (paths to files).

File

./views_pdf_template.php, line 1158
PDF Class to generate PDFs with native PHP. This class based on FPDF and FPDI.

Class

PdfTemplate
The main class to generate the PDF.

Code

public static function getAvailableHyphenatePatterns() {
  if (self::$hyphenatePatterns != NULL) {
    return self::$hyphenatePatterns;
  }
  self::$hyphenatePatterns = array();
  $files = file_scan_directory(views_pdf_get_library('tcpdf') . '/hyphenate_patterns', '/.tex$/', array(
    'nomask' => '/(\\.\\.?|CVS)$/',
  ), 1);
  foreach ($files as $file) {
    self::$hyphenatePatterns[basename($file->uri)] = str_replace('hyph-', '', $file->name);
  }
  return self::$hyphenatePatterns;
}