feeds_jsonpath_parser.install 980 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * @file
  4. * Installation file for Feeds JSONPath Parser module.
  5. */
  6. /**
  7. * Implements hook_requirements().
  8. */
  9. function feeds_jsonpath_parser_requirements($phase) {
  10. $requirements = array();
  11. if ($phase == 'install') {
  12. $t = get_t();
  13. $requirements['feeds_jsonpath_parser']['title'] = $t('Feeds JSONPath Parser');
  14. if (glob(dirname(__FILE__) . '/jsonpath*.php')) {
  15. $requirements['feeds_jsonpath_parser']['severity'] = REQUIREMENT_OK;
  16. }
  17. else {
  18. $requirements['feeds_jsonpath_parser']['severity'] = REQUIREMENT_ERROR;
  19. $requirements['feeds_jsonpath_parser']['description'] = $t('The <a href="@jsonpath">JSONPath</a> plugin is missing. <a href="@download">Download</a> and place in the feeds_jsonpath_parser module directory.', array(
  20. '@jsonpath' => 'http://goessner.net/articles/JsonPath/',
  21. '@download' => 'http://jsonpath.googlecode.com/svn/trunk/src/php/jsonpath.php',
  22. ));
  23. }
  24. }
  25. return $requirements;
  26. }