protected function addTextList(
        EntityInterface $entity,
        AttributeInterface $attribute,
        array $options = array()
    ) {
        $values = array();

        $number_of_values = $this->faker->numberBetween(1, 5);
        for ($i = 0; $i < $number_of_values; $i++) {
            $text = $this->faker->words($this->faker->numberBetween(1, 3), true);
            if ($this->shouldGuessByName($options)) {
                $closure = TextGuesser::guess($attribute->getName(), $this->faker);
                if (!empty($closure) && is_callable($closure)) {
                    $text = call_user_func($closure);
                }
            }
            $values[] = $text;
        }

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

        $number_of_values = $this->faker->numberBetween(1, 5);
        for ($i = 0; $i < $number_of_values; $i++) {
            $text = $this->faker->words($this->faker->numberBetween(1, 3), true);
            if ($this->shouldGuessByName($options)) {
                $closure = TextGuesser::guess($attribute->getName(), $this->faker);
                if (!empty($closure) && is_callable($closure)) {
                    $text = call_user_func($closure);
                }
            }
            $values[] = $text;
        }

        $this->setValue($entity, $attribute, $values, $options);
    }
protected function addTextList ( EntityInterface $ entity , AttributeInterface $ attribute , array $ options = array ( ) ) { $ values = array ( ) ; $ number_of_values = $ this -> faker -> numberBetween ( 1 , 5 ) ; for ( $ i = 0 ; $ i < $ number_of_values ; $ i ++ ) { $ text = $ this -> faker -> words ( $ this -> faker -> numberBetween ( 1 , 3 ) , true ) ; if ( $ this -> shouldGuessByName ( $ options ) ) { $ closure = TextGuesser :: guess ( $ attribute -> getName ( ) , $ this -> faker ) ; if ( ! empty ( $ closure ) && is_callable ( $ closure ) ) { $ text = call_user_func ( $ closure ) ; } } $ values [ ] = $ text ; } $ this -> setValue ( $ entity , $ attribute , $ values , $ options ) ; }
Generates and adds fake data for a TextCollection on a entity.

@param EntityInterface $entity an instance of the entity to fill with fake data.
@param AttributeInterface $attribute an instance of the TextCollection 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 TextCollection on a entity .