TripalImporter.inc 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php
  2. class TripalImporter {
  3. // --------------------------------------------------------------------------
  4. // EDITABLE STATIC CONSTANTS
  5. //
  6. // The following constants SHOULD be set for each descendent class. They are
  7. // used by the static functions to provide information to Drupal about
  8. // the field and it's default widget and formatter.
  9. // --------------------------------------------------------------------------
  10. /**
  11. * The name of this loader. This name will be presented to the site
  12. * user.
  13. */
  14. public static $name = 'Tripal Loader';
  15. /**
  16. * The machine name for this loader. This name will be used to construct
  17. * the URL for the loader.
  18. */
  19. public static $machine_name = 'tripal_loader';
  20. /**
  21. * A brief description for this loader. This description will be
  22. * presented to the site user.
  23. */
  24. public static $description = 'A base loader for all Tripal loaders';
  25. /**
  26. * An array containing the extensions of allowed file types.
  27. */
  28. public static $file_types = array();
  29. /**
  30. * Provides information to the user about the file upload. Typically this
  31. * may include a description of the file types allowed.
  32. */
  33. public static $upload_description = '';
  34. /**
  35. * The title that should appear above the upload button.
  36. */
  37. public static $upload_title = 'File Upload';
  38. // --------------------------------------------------------------------------
  39. // CONSTRUCTORS
  40. // --------------------------------------------------------------------------
  41. /**
  42. * Instantiates a new TripalImporter object.
  43. *
  44. * @param $job_id
  45. */
  46. public function __construct() {
  47. }
  48. // --------------------------------------------------------------------------
  49. // PROTECTED FUNCTIONS
  50. // --------------------------------------------------------------------------
  51. // --------------------------------------------------------------------------
  52. // OVERRIDEABLE FUNCTIONS
  53. // --------------------------------------------------------------------------
  54. public function form($form, &$form_state) {
  55. return $form;
  56. }
  57. public function formSubmit($form, &$form_state) {
  58. }
  59. public function formValidate($form, &$form_state) {
  60. }
  61. public function preRun($details) {
  62. }
  63. public function run($details, $job_id = NULL) {
  64. }
  65. public function postRun($details) {
  66. }
  67. }