You are here

function RealisticDummyContentFieldModifier::GetProperties in Realistic Dummy Content 7

Get properties for the entity, for example user's picture or node's name.

Return value

An array of RealisticDummyContentAttribute objects, keyed by attribute name, e.g. title => [RealisticDummyContentAttribute], field_image => [RealisticDummyContentAttribute]

1 call to RealisticDummyContentFieldModifier::GetProperties()
RealisticDummyContentFieldModifier::GetAttributes in api/includes/RealisticDummyContentEntityFieldModifier.inc
Returns all fields and properties.

File

api/includes/RealisticDummyContentEntityFieldModifier.inc, line 44
Define RealisticDummyContentFieldModifier autoload class.

Class

RealisticDummyContentFieldModifier
Field modifier class.

Code

function GetProperties() {
  $modifiable_properties = array();
  $fields = $this
    ->GetFields();
  foreach ((array) $this
    ->GetEntity() as $property => $info) {
    if (!in_array($property, array_keys($fields)) && $this
      ->filter($property)) {
      $this
        ->AddModifier($modifiable_properties, 'property', $property);
    }
  }
  return $modifiable_properties;
}