public function RealisticDummyContentAttribute::rand in Realistic Dummy Content 3.x
Same name and namespace in other branches
- 8.2 api/src/includes/RealisticDummyContentAttribute.php \Drupal\realistic_dummy_content_api\includes\RealisticDummyContentAttribute::rand()
- 7.2 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 75
Class
- RealisticDummyContentAttribute
- Represents either a field or a property for an entity.
Namespace
Drupal\realistic_dummy_content_api\includesCode
public function rand($start, $end) {
return $this
->getEntity()
->rand($start, $end);
}