You are here

function om_tools_get in OM Tools 8.2

Same name and namespace in other branches
  1. 8 om_tools.module \om_tools_get()
  2. 6.2 inc/om_tools.utils.inc \om_tools_get()
  3. 6 om_tools.module \om_tools_get()
  4. 7.2 inc/om_tools.utils.inc \om_tools_get()
  5. 7 om_tools.module \om_tools_get()

OM Tools get file names from /tools directory

  • reads directory names
5 calls to om_tools_get()
om_tools_admin in inc/om_tools.admin.inc
Admin Form - Simple Editing
om_tools_admin_submit in inc/om_tools.admin.inc
1 Submit for all settings
om_tools_alter in inc/om_tools.utils.inc
OM Tools alter forms processor
om_tools_menu in ./om_tools.module
Implementation of hook_menu().
om_tools_processor in inc/om_tools.utils.inc
OM Tools processor

File

inc/om_tools.utils.inc, line 58
OM Tools Admin Utilities

Code

function om_tools_get() {
  $files = array();
  $dir = drupal_get_path('module', 'om_tools') . '/tools/';
  $folders = scandir($dir);
  $excluded_files = array(
    '.',
    '..',
    '.cvs',
    '.svn',
    '.git',
  );
  foreach ($folders as $key => $val) {
    if (!in_array($val, $excluded_files)) {
      is_dir($dir . $val) ? $files[] = $val : '';
    }
  }
  return $files;
}