You are here

function RealisticDummyContentAttribute::Change in Realistic Dummy Content 7

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/includes/RealisticDummyContentAttribute.inc, line 131
Define RealisticDummyContentAttribute autoload class.

Class

RealisticDummyContentAttribute
Represents either a field or a property for an entity.

Code

function Change() {
  $files = $this
    ->GetCandidateFiles();
  $this
    ->ChangeFromFiles($files);
}