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

        $min_count = $attribute->getOption('min_count', 0);
        $max_count = $attribute->getOption('max_count', 3);

        $numberOfEntries = $this->faker->numberBetween($min_count, $max_count);
        $image_attribute = new ImageAttribute('someimage', $entity->getType());

        // @todo should we have an ImageList collection?
        for ($i = 0; $i < $numberOfEntries; $i++) {
            $collection[] = $this->createComplexValue($image_attribute, $options);
        }

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

        $min_count = $attribute->getOption('min_count', 0);
        $max_count = $attribute->getOption('max_count', 3);

        $numberOfEntries = $this->faker->numberBetween($min_count, $max_count);
        $image_attribute = new ImageAttribute('someimage', $entity->getType());

        // @todo should we have an ImageList collection?
        for ($i = 0; $i < $numberOfEntries; $i++) {
            $collection[] = $this->createComplexValue($image_attribute, $options);
        }

        $this->setValue($entity, $attribute, $collection, $options);
    }
protected function addImageList ( EntityInterface $ entity , AttributeInterface $ attribute , array $ options = array ( ) ) { $ collection = array ( ) ; $ min_count = $ attribute -> getOption ( 'min_count' , 0 ) ; $ max_count = $ attribute -> getOption ( 'max_count' , 3 ) ; $ numberOfEntries = $ this -> faker -> numberBetween ( $ min_count , $ max_count ) ; $ image_attribute = new ImageAttribute ( 'someimage' , $ entity -> getType ( ) ) ; // @todo should we have an ImageList collection? for ( $ i = 0 ; $ i < $ numberOfEntries ; $ i ++ ) { $ collection [ ] = $ this -> createComplexValue ( $ image_attribute , $ options ) ; } $ this -> setValue ( $ entity , $ attribute , $ collection , $ options ) ; }
Generates and adds fake data for a ImageList on a entity.

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