You are here

static function RealisticDummyContentEnvironment::addFileToArray in Realistic Dummy Content 7

1 call to RealisticDummyContentEnvironment::addFileToArray()
RealisticDummyContentEnvironment::SortCandidateFiles_ in api/includes/RealisticDummyContentEnvironment.inc
Given a list of candidate files, sort them by names and parts.

File

api/includes/RealisticDummyContentEnvironment.inc, line 281
Define RealisticDummyContentLiveEnvironment autoload class.

Class

RealisticDummyContentEnvironment
The abstract base environment.

Code

static function addFileToArray(&$array, $name, $file) {
  $attribute_name = NULL;
  $attribute_extention = NULL;
  $fileinfo = self::getFileParts($name);
  if (isset($fileinfo['attribute_name'])) {
    $array[$fileinfo['base']]['attributes'][$fileinfo['attribute_name']] = $file;
  }
  else {
    $array[$fileinfo['base']]['file'] = $file;
  }
}