You are here

public function RealisticDummyContentAttribute::__construct in Realistic Dummy Content 3.x

Same name and namespace in other branches
  1. 8.2 api/src/includes/RealisticDummyContentAttribute.php \Drupal\realistic_dummy_content_api\includes\RealisticDummyContentAttribute::__construct()
  2. 7.2 api/src/includes/RealisticDummyContentAttribute.php \Drupal\realistic_dummy_content_api\includes\RealisticDummyContentAttribute::__construct()

Constructor.

Parameters

object $entity: Object of a subclass of RealisticDummyContentEntityBase.

string $name: The name of the field, for example body or picture or field_image.

File

api/src/includes/RealisticDummyContentAttribute.php, line 47

Class

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

Namespace

Drupal\realistic_dummy_content_api\includes

Code

public function __construct($entity, $name) {
  $this->entity = $entity;
  $this->name = $name;
}