function tripal_load_include_importer_class
3.x tripal.importer.api.inc | tripal_load_include_importer_class($class) |
Loads the TripalImporter class file into scope.
Parameters
$class: The TripalImporter class to include.
Return value
TRUE if the field type class file was found, FALSE otherwise.
Related topics
5 calls to tripal_load_include_importer_class()
- TripalImporter::byID in tripal/
includes/ TripalImporter.inc - Instantiates a new TripalImporter object using the import record ID.
- tripal_get_importer_form in tripal/
includes/ tripal.importer.inc - Build the form for a TripalImporter implementation.
- tripal_get_importer_form_submit in tripal/
includes/ tripal.importer.inc - Submit function for the tripal_get_importer_form form().
- tripal_get_importer_form_validate in tripal/
includes/ tripal.importer.inc - Validate function for the tripal_get_importer_form form().
- tripal_menu in tripal/
tripal.module - Implements hook_menu(). Defines all menu items needed by Tripal Core
File
- tripal/
api/ tripal.importer.api.inc, line 85 - Provides an application programming interface (API) for working with data file importers using the TripalImporter class.
Code
function tripal_load_include_importer_class($class) {
$modules = module_list(TRUE);
foreach ($modules as $module) {
$file_path = realpath(".") . '/' . drupal_get_path('module', $module) . '/includes/TripalImporter/' . $class . '.inc';
if (file_exists($file_path)) {
module_load_include('inc', $module, 'includes/TripalImporter/' . $class);
if (class_exists($class)) {
return TRUE;
}
}
}
return FALSE;
}