You are here

function sharerich_get_default_services in Sharerich 8

Helper to scan the services folder.

Return value

A list of file names.

1 call to sharerich_get_default_services()
SharerichForm::buildOverviewFormRows in src/Form/SharerichForm.php
Helper to build rows of services.

File

./sharerich.module, line 70
Contains sharerich.module..

Code

function sharerich_get_default_services() {
  $dir = drupal_get_path('module', 'sharerich') . '/services';
  $list = \Drupal::service('file_system')
    ->scanDirectory($dir, '/.inc/', array(), 0);
  return array_map(function ($service) {
    return $service->name;
  }, $list);
}