Beispiel #1
0
 /**
  * Creates `count` number of entities with fake data for the given type.
  *
  * @param EntityTypeInterface $type type to create entities for
  * @param array $options use `count` for number of entities to create. For other options see fill() method.
  *
  * @return array of new entities with fake data
  *
  * @throws \Trellis\Runtime\Entity\InvalidValueException in case of fake data being invalid for the given attribute
  * @throws \Trellis\Runtime\Entity\BadValueException in case of invalid locale option string
  * @throws \Trellis\Common\Error\RuntimeException on EmbeddedEntityListAttribute misconfiguration
  */
 public static function createEntities(EntityTypeInterface $type, array $options = array())
 {
     $data_generator = new DataGenerator();
     return $data_generator->createFakeEntities($type, $options);
 }