Browse Source

Added a cardinality to the TripalImporter class

Stephen Ficklin 7 years ago
parent
commit
f14c6f0c81
2 changed files with 9 additions and 0 deletions
  1. 8 0
      tripal/includes/TripalImporter.inc
  2. 1 0
      tripal/includes/tripal.importer.inc

+ 8 - 0
tripal/includes/TripalImporter.inc

@@ -97,6 +97,14 @@ class TripalImporter {
    */
   public static $argument_list = array();
 
+
+  /**
+   * Indicates how many files are allowed to be uploaded.  By default this is
+   * set to allow only one file.  Change to any positive number. A value of
+   * zero indicates an unlimited number of uploaded files are allowed.
+   */
+  public static $cardinality = 1;
+
   // --------------------------------------------------------------------------
   //                  PRIVATE MEMBERS -- DO NOT EDIT or OVERRIDE
   // --------------------------------------------------------------------------

+ 1 - 0
tripal/includes/tripal.importer.inc

@@ -36,6 +36,7 @@ function tripal_get_importer_form($form, &$form_state, $class) {
       '#usage_type' => 'tripal_importer',
       '#usage_id' => 0,
       '#allowed_types' => $class::$file_types,
+      '#cardinality' => $class::$cardinality,
     );
   }