You are here

function om_tools_get in OM Tools 6

Same name and namespace in other branches
  1. 8.2 inc/om_tools.utils.inc \om_tools_get()
  2. 8 om_tools.module \om_tools_get()
  3. 6.2 inc/om_tools.utils.inc \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
4 calls to om_tools_get()
om_tools_admin in ./om_tools.module
Admin Forms
om_tools_form_alter in ./om_tools.module
Implementation of hook_form_alter().
om_tools_preprocess_block in ./om_tools.module
Override or insert om variables into the templates.
om_tools_preprocess_page in ./om_tools.module
Override or insert om variables into the templates.

File

./om_tools.module, line 154
This is a collection of OM Tools.

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;
}