public function RealisticDummyContentAttribute::getExtensions in Realistic Dummy Content 3.x
Same name and namespace in other branches
- 8.2 api/src/includes/RealisticDummyContentAttribute.php \Drupal\realistic_dummy_content_api\includes\RealisticDummyContentAttribute::getExtensions()
- 7.2 api/src/includes/RealisticDummyContentAttribute.php \Drupal\realistic_dummy_content_api\includes\RealisticDummyContentAttribute::getExtensions()
Get acceptable file extensions which contain data for this attribute.
For example, title attributes can be replaced by data in txt files, whereas picture and field_image attributes require png, jpg, gif.
Return value
array An array of acceptable file extensions.
2 calls to RealisticDummyContentAttribute::getExtensions()
- RealisticDummyContentAttribute::getCandidateFiles in api/
src/ includes/ RealisticDummyContentAttribute.php - Get all candidate files for a given field for this entity.
- RealisticDummyContentAttribute::valueFromFile in api/
src/ includes/ RealisticDummyContentAttribute.php - Given a RealisticDummyContentFileGroup object, get structured property.
1 method overrides RealisticDummyContentAttribute::getExtensions()
- RealisticDummyContentImageField::getExtensions in api/
src/ includes/ RealisticDummyContentImageField.php - Get acceptable file extensions which contain data for this attribute.
File
- api/
src/ includes/ RealisticDummyContentAttribute.php, line 172
Class
- RealisticDummyContentAttribute
- Represents either a field or a property for an entity.
Namespace
Drupal\realistic_dummy_content_api\includesCode
public function getExtensions() {
// By default, use only text files. Other manipulators, say, for image
// fields or file fields, can specify other extension types.
return [
'txt',
];
}