You are here

class SimpleGenerator in Realistic Dummy Content 8

Hierarchy

  • class \Drupal\realistic_dummy_content_api\generators\Generator

Expanded class hierarchy of SimpleGenerator

File

api/src/generators/SimpleGenerator.php, line 13
Define autoload class.

Namespace

Drupal\realistic_dummy_content_api\generators
View source
class SimpleGenerator extends Generator {

  /**
   * @throws
   *   \Exception
   */
  function _Generate_() {
    for ($i = 0; $i < $this
      ->GetNum(); $i++) {
      $info = array(
        'devel_generate' => TRUE,
      );
      $entity = entity_create($this
        ->GetType(), $info);
      $entity
        ->save();
    }
  }

}

Members