Project

General

Profile

Paste
Download (700 Bytes) Statistics
| Branch: | Revision:

root / drupal7 / sites / all / modules / print / print_epub / lib_handlers / print_epub_phpepub / print_epub_phpepub.drush.inc @ 76bdcd04

1
<?php
2

    
3
/**
4
 * @file
5
 * Provides drush integration for print_epub_phpepub module.
6
 */
7

    
8
/**
9
 * The EPUB project download URL.
10
 */
11

    
12
// URI to the the latest PHPePub version.
13
define('PHPEPUB_DOWNLOAD_URI', 'https://api.github.com/repos/Grandt/PHPePub/releases/latest');
14

    
15
/**
16
 * Implements hook_drush_command().
17
 */
18
function print_epub_phpepub_drush_epub_libs_alter(&$epub_libs) {
19
  $epub_libs['phpepub'] = array(
20
    'callback' => '_print_epub_phpepub_drush_download_url',
21
  );
22
}
23

    
24
/**
25
 * Discover the correct URL of the package to download.
26
 *
27
 * @return string
28
 *   URL of the file to download, FALSE if not known
29
 */
30
function _print_epub_phpepub_drush_download_url() {
31
  return PHPEPUB_DOWNLOAD_URI;
32
}