public static function RealisticDummyContentEnvironment::validCandidateFilename in Realistic Dummy Content 8.2
Same name and namespace in other branches
- 7.2 api/src/includes/RealisticDummyContentEnvironment.php \Drupal\realistic_dummy_content_api\includes\RealisticDummyContentEnvironment::validCandidateFilename()
- 3.x api/src/includes/RealisticDummyContentEnvironment.php \Drupal\realistic_dummy_content_api\includes\RealisticDummyContentEnvironment::validCandidateFilename()
Checks if a filename is valid.
1 call to RealisticDummyContentEnvironment::validCandidateFilename()
- RealisticDummyContentEnvironment::implementSortCandidateFiles in api/
src/ includes/ RealisticDummyContentEnvironment.php - Given a list of candidate files, sort them by names and parts.
File
- api/
src/ includes/ RealisticDummyContentEnvironment.php, line 276
Class
- RealisticDummyContentEnvironment
- The abstract base environment.
Namespace
Drupal\realistic_dummy_content_api\includesCode
public static function validCandidateFilename($name, $extensions = NULL) {
if (self::lowercaseRadicalNoExtension($name) == 'readme') {
return FALSE;
}
if (!$extensions) {
return TRUE;
}
$filparts = self::getFileParts($name);
return in_array($filparts['base_extension'], $extensions);
}