static function Environment::addFileToArray in Realistic Dummy Content 8
1 call to Environment::addFileToArray()
- Environment::SortCandidateFiles_ in api/
src/ environments/ Environment.php - Given a list of candidate files, sort them by names and parts.
File
- api/
src/ environments/ Environment.php, line 278 - Define autoload class.
Class
- Environment
- The abstract base environment.
Namespace
Drupal\realistic_dummy_content_api\environmentsCode
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;
}
}