print_pdf_mpdf.drush.inc 688 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * @file
  4. * drush integration for print_pdf_mpdf module PDF libraries download.
  5. */
  6. /**
  7. * The PDF project download URL
  8. */
  9. // URI to the the latest mpdf version.. Hardcoded version unfortunately
  10. define('MPDF_DOWNLOAD_URI', 'http://mpdf1.com/repos/MPDF57.zip');
  11. /**
  12. * Implements hook_drush_command().
  13. */
  14. function print_pdf_mpdf_drush_pdf_libs_alter(&$pdf_libs) {
  15. $pdf_libs['mpdf'] = array(
  16. 'callback' => '_print_pdf_mpdf_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_mpdf_drush_download_url() {
  26. return MPDF_DOWNLOAD_URI;
  27. }