You are here

function sharerich_get_services in Sharerich 7.2

Same name and namespace in other branches
  1. 7.3 sharerich.module \sharerich_get_services()
  2. 7 sharerich.module \sharerich_get_services()

Helper to scan the services folder.

Return value

A list of file names.

3 calls to sharerich_get_services()
sharerich_ctools_export_ui_form in plugins/export_ui/sharerich_ctools_export_ui.inc
Define the preset add/edit form.
sharerich_install in ./sharerich.install
Implements hook_install().
sharerich_uninstall in ./sharerich.install
Implements hook_uninstall().

File

./sharerich.module, line 304

Code

function sharerich_get_services() {
  $dir = drupal_get_path('module', 'sharerich') . '/services';
  $list = file_scan_directory($dir, '/.inc/', array(), 0);
  return array_map(function ($service) {
    return $service->name;
  }, $list);
}