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
-
object | $file | The Drupal file object of the newly uploaded file. |
string | $type | The category or type of file. |
- Returns
- int A Drupal managed file ID.
◆ 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
-
int | $import_id | The ID of the import record. |
\Drupal\tripal\Services\TripalJob | $job | An optional Job object. |
- Exceptions
-
◆ tripal_run_importer_post_run()
tripal_run_importer_post_run |
( |
|
$loader, |
|
|
|
$logger |
|
) |
| |
Second step of the tripal_run_importer.
- Parameters
-
Drupal\tripal\TripalImporter\TripalImporterBase | $loader | The TripalImporter object. |
Drupal\tripal\Services\TripalLogger | $logger | The TripalLogger object. |
◆ tripal_run_importer_run()
tripal_run_importer_run |
( |
|
$loader, |
|
|
|
$logger |
|
) |
| |
First step of the tripal_run_importer.
- Parameters
-
Drupal\tripal\TripalImporter\TripalImporterBase | $loader | The TripalImporter object. |
Drupal\tripal\Services\TripalLogger | $logger | The TripalLogger object. |
- Exceptions
-