function Attribute::Change in Realistic Dummy Content 8
Changes this attribute by looking for data in files.
Any module can define a file hierarchy to determine realistic dummy data for this attribute. See the ./realistic_dummy_content/ folder for an example.
This function checks the filesystem for compatible files (for example, only image files are acceptable candidate files for field_image), choose one through the selection mechanism (random or sequential), and then procedes to change the data for the associated field for this class.
File
- api/
src/ attributes/ Attribute.php, line 139 - Define autoload class.
Class
- Attribute
- Represents either a field or a property for an entity.
Namespace
Drupal\realistic_dummy_content_api\attributesCode
function Change() {
$files = $this
->GetCandidateFiles();
$this
->ChangeFromFiles($files);
}