protected function addKeyValueList(
        EntityInterface $entity,
        AttributeInterface $attribute,
        array $options = array()
    ) {
        $collection = array();

        $numberOfEntries = $this->faker->numberBetween(1, 5);
        for ($i = 0; $i < $numberOfEntries; $i++) {
            $number_of_values = $this->faker->numberBetween(1, 5);
            for ($i = 0; $i < $number_of_values; $i++) {
                $collection[$this->faker->word] = $this->faker->words($this->faker->numberBetween(1, 3), true);
            }
        }

        $this->setValue($entity, $attribute, $collection, $options);
    }
protected function addKeyValueList(
        EntityInterface $entity,
        AttributeInterface $attribute,
        array $options = array()
    ) {
        $collection = array();

        $numberOfEntries = $this->faker->numberBetween(1, 5);
        for ($i = 0; $i < $numberOfEntries; $i++) {
            $number_of_values = $this->faker->numberBetween(1, 5);
            for ($i = 0; $i < $number_of_values; $i++) {
                $collection[$this->faker->word] = $this->faker->words($this->faker->numberBetween(1, 3), true);
            }
        }

        $this->setValue($entity, $attribute, $collection, $options);
    }
protected function addKeyValueList ( EntityInterface $ entity , AttributeInterface $ attribute , array $ options = array ( ) ) { $ collection = array ( ) ; $ numberOfEntries = $ this -> faker -> numberBetween ( 1 , 5 ) ; for ( $ i = 0 ; $ i < $ numberOfEntries ; $ i ++ ) { $ number_of_values = $ this -> faker -> numberBetween ( 1 , 5 ) ; for ( $ i = 0 ; $ i < $ number_of_values ; $ i ++ ) { $ collection [ $ this -> faker -> word ] = $ this -> faker -> words ( $ this -> faker -> numberBetween ( 1 , 3 ) , true ) ; } } $ this -> setValue ( $ entity , $ attribute , $ collection , $ options ) ; }
Generates and adds fake data for a KeyValueList on a entity.

@param EntityInterface $entity an instance of the entity to fill with fake data.
@param AttributeInterface $attribute an instance of the KeyValueList to fill with fake data.
@param array $options array of options to customize fake data creation.

@return void
Generates and adds fake data for a KeyValueList on a entity .