You are here

static function Recipe::GetGenerator in Realistic Dummy Content 8

Parameters

$more: Can contain: kill => TRUE|FALSE

1 call to Recipe::GetGenerator()
Recipe::NewEntities in api/src/recipes/Recipe.php

File

api/src/recipes/Recipe.php, line 46
Define autoload class.

Class

Recipe

Namespace

Drupal\realistic_dummy_content_api\recipes

Code

static function GetGenerator($type, $bundle, $count, $more) {
  if (in_array($type, array(
    'user',
    'node',
  ))) {
    if (module_exists('devel_generate')) {
      return new DevelGenerateGenerator($type, $bundle, $count, $more);
    }
    else {
      self::$log
        ->Error(t('Please enable devel\'s devel_generate module to generate users or nodes.'));
    }
  }
  else {
    self::$log
      ->Error(t('Entity types other than user and node are not supported for realistic dummy content recipe.'));
  }
}