function sharerich_load_service in Sharerich 7.3
Same name and namespace in other branches
- 7 sharerich.module \sharerich_load_service()
- 7.2 sharerich.module \sharerich_load_service()
Helper to load services from the disk.
2 calls to sharerich_load_service()
- SharerichTest::testAdminUI in tests/
sharerich.test - Admin UI.
- sharerich_get_service_content in ./
sharerich.module - Helper to get the service content from file or ctools object.
File
- ./
sharerich.module, line 314
Code
function sharerich_load_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;
}