You are here

function pm_icon_recache in Drupal PM (Project Management) 8

Same name and namespace in other branches
  1. 7.3 includes/pm.icon.inc \pm_icon_recache()
  2. 7 pm.module \pm_icon_recache()
  3. 7.2 pm.module \pm_icon_recache()

Forces a recache of Project Management icons.

File

./pm.module, line 499
Main module file for the Project Management module.

Code

function pm_icon_recache() {
  $available = array();
  $dir = variable_get('pm_icons_path', drupal_get_path('module', 'pm') . '/icons');
  $files = scandir($dir);
  foreach ($files as $file) {
    $available[] = $file;
  }
  cache_set('pm:icons', $available, 'cache', CACHE_TEMPORARY);
  $available = cache_get('pm:icons');
  return $available;
}