public static function RealisticDummyContentEnvironment::getFileParts in Realistic Dummy Content 3.x
Same name and namespace in other branches
- 8.2 api/src/includes/RealisticDummyContentEnvironment.php \Drupal\realistic_dummy_content_api\includes\RealisticDummyContentEnvironment::getFileParts()
- 7.2 api/src/includes/RealisticDummyContentEnvironment.php \Drupal\realistic_dummy_content_api\includes\RealisticDummyContentEnvironment::getFileParts()
Retrieves the parts constituting a filename.
2 calls to RealisticDummyContentEnvironment::getFileParts()
- RealisticDummyContentEnvironment::addFileToArray in api/
src/ includes/ RealisticDummyContentEnvironment.php - Adds a file to an array of file group parts.
- RealisticDummyContentEnvironment::validCandidateFilename in api/
src/ includes/ RealisticDummyContentEnvironment.php - Checks if a filename is valid.
File
- api/
src/ includes/ RealisticDummyContentEnvironment.php, line 278
Class
- RealisticDummyContentEnvironment
- The abstract base environment.
Namespace
Drupal\realistic_dummy_content_api\includesCode
public static function getFileParts($name) {
$return = [];
$parts = explode('.', $name);
if (count($parts) >= 4) {
$return['attribute_extention'] = array_pop($parts);
$return['attribute_name'] = array_pop($parts);
}
$return['base'] = implode('.', $parts);
$return['base_extension'] = array_pop($parts);
return $return;
}