You are here

protected function DevelGenerateBase::getRandom in Devel 8

Same name and namespace in other branches
  1. 8.3 devel_generate/src/DevelGenerateBase.php \Drupal\devel_generate\DevelGenerateBase::getRandom()
  2. 8.2 devel_generate/src/DevelGenerateBase.php \Drupal\devel_generate\DevelGenerateBase::getRandom()
  3. 4.x devel_generate/src/DevelGenerateBase.php \Drupal\devel_generate\DevelGenerateBase::getRandom()

Returns the random data generator.

Return value

\Drupal\Component\Utility\Random The random data generator.

File

devel_generate/src/DevelGenerateBase.php, line 162

Class

DevelGenerateBase
Provides a base DevelGenerate plugin implementation.

Namespace

Drupal\devel_generate

Code

protected function getRandom() {
  if (!$this->random) {
    $this->random = new Random();
  }
  return $this->random;
}