You are here

function Attribute::rand in Realistic Dummy Content 8

Returns a pseudo-random number.

The number should be the same for the same entity, so we need to know the entity.

Return value

A random or sequential number.

1 call to Attribute::rand()
Attribute::ValueFromFiles in api/src/attributes/Attribute.php
Given a list of files, return a value from one of them.

File

api/src/attributes/Attribute.php, line 75
Define autoload class.

Class

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

Namespace

Drupal\realistic_dummy_content_api\attributes

Code

function rand($start, $end) {
  return $this
    ->GetEntity()
    ->rand($start, $end);
}