Provides an application programming interface (API) for working with data file importers using the TripalImporter class into a chado database.
◆ hook_handle_uploaded_file()
hook_handle_uploaded_file |
( |
|
$file, |
|
|
|
$type |
|
) |
| |
Implements hook_handle_uploaded_file().
This is a Tripal hook that allows the module to set the proper parameters for a file uploaded via the Tripal HTML5 uploader.
- Parameters
-
$file | The Drupal file object of the newly uploaded file. |
$type | The category or type of file. |
- Returns
- A Drupal managed file ID.
◆ tripal_get_importers()
Retrieves a list of TripalImporter Importers.
The TripalImporter classes can be added by a site developer that wishes to create a new data loader. The class file should be placed in the [module]/includes/TripalImporter directory. Tripal will support any loader as long as it is in this directory and extends the TripalImporter class.
- Returns
- A list of TripalImporter names.
◆ tripal_load_include_importer_class()
tripal_load_include_importer_class |
( |
|
$class | ) |
|
Loads the TripalImporter class file into scope.
- Parameters
-
- Returns
- TRUE if the field type class file was found, FALSE otherwise.
◆ tripal_run_importer()
tripal_run_importer |
( |
|
$import_id, |
|
|
TripalJob |
$job = NULL |
|
) |
| |
Imports data into the database.
Tripal provides the TripalImporter class to allow site developers to create their own data loaders. Site users can then use any data loader implemented for the site by submitting the form that comes with the TripalImporter implementation. This function runs the importer using the arguments provided by the user.
- Parameters
-
$import_id | The ID of the import record. |
- Exceptions
-
◆ tripal_run_importer_post_run()
tripal_run_importer_post_run |
( |
|
$loader, |
|
|
|
$job |
|
) |
| |
Second step of the tripal_run_importer.
- Parameters
-
- Exceptions
-
◆ tripal_run_importer_run()
tripal_run_importer_run |
( |
|
$loader, |
|
|
|
$job |
|
) |
| |
First step of the tripal_run_importer.
- Parameters
-
- Exceptions
-