You are here

public function RealisticDummyContentAttribute::rand in Realistic Dummy Content 7.2

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

Returns a pseudo-random number.

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

Return value

int A random or sequential number.

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

File

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

Class

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

Namespace

Drupal\realistic_dummy_content_api\includes

Code

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