function DevelGenerateBase::getRandom

Same name in other branches
  1. 8.x-1.x devel_generate/src/DevelGenerateBase.php \Drupal\devel_generate\DevelGenerateBase::getRandom()
  2. 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 214

Class

DevelGenerateBase
Provides a base DevelGenerate plugin implementation.

Namespace

Drupal\devel_generate

Code

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