You are here

public function RealisticDummyContentFieldModifier::getAttributes in Realistic Dummy Content 8.2

Same name and namespace in other branches
  1. 7.2 api/src/includes/RealisticDummyContentFieldModifier.php \Drupal\realistic_dummy_content_api\includes\RealisticDummyContentFieldModifier::getAttributes()
  2. 3.x api/src/includes/RealisticDummyContentFieldModifier.php \Drupal\realistic_dummy_content_api\includes\RealisticDummyContentFieldModifier::getAttributes()

Returns all fields and properties.

We implement fields and properties as subclasses of the same parent class, which defines a common interface for dealing with them.

Return value

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

1 call to RealisticDummyContentFieldModifier::getAttributes()
RealisticDummyContentFieldModifier::modify in api/src/includes/RealisticDummyContentFieldModifier.php
Modify the entity.

File

api/src/includes/RealisticDummyContentFieldModifier.php, line 175

Class

RealisticDummyContentFieldModifier
Field modifier class.

Namespace

Drupal\realistic_dummy_content_api\includes

Code

public function getAttributes() {
  return array_merge($this
    ->getFields(), $this
    ->getProperties());
}