function sharerich_load_default_service in Sharerich 8
Helper to load services from the disk.
1 call to sharerich_load_default_service()
- SharerichForm::buildOverviewFormRows in src/
Form/ SharerichForm.php - Helper to build rows of services.
File
- ./
sharerich.module, line 81 - Contains sharerich.module..
Code
function sharerich_load_default_service($service_name) {
$dir = drupal_get_path('module', 'sharerich') . '/services';
$service_name = $dir . '/' . $service_name . '.inc';
if (file_exists($service_name)) {
return file_get_contents($service_name);
}
return FALSE;
}