print_pdf_tcpdf.drush.inc 717 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * @file
  4. * drush integration for print_pdf_tcpdf module PDF libraries download.
  5. */
  6. /**
  7. * The PDF project download URL
  8. */
  9. // TCPDF is in sourceforge, and nicely provides a link to the latest version
  10. define('TCPDF_DOWNLOAD_URI', 'http://sourceforge.net/projects/tcpdf/files/latest');
  11. /**
  12. * Implements hook_drush_command().
  13. */
  14. function print_pdf_tcpdf_drush_pdf_libs_alter(&$pdf_libs) {
  15. $pdf_libs['tcpdf'] = array(
  16. 'callback' => '_print_pdf_tcpdf_drush_download_url',
  17. );
  18. }
  19. /**
  20. * Discover the correct URL of the package to download.
  21. *
  22. * @return string
  23. * URL of the file to download, FALSE if not known
  24. */
  25. function _print_pdf_tcpdf_drush_download_url() {
  26. return TCPDF_DOWNLOAD_URI;
  27. }