public function createImageCollection(array $data = [])
    {
        $collection = new Images();

        foreach ($data as $format => $formatCollection) {

            if (!is_array($formatCollection)) {
                continue;
            }

            foreach ($formatCollection as $item) {
                if (array_key_exists($format, Image::$formats)) {
                    $item = $this->create($item, $format);

                    $collection->addImage($item);
                }
            }
        }

        return $collection;
    }
public function createImageCollection(array $data = [])
    {
        $collection = new Images();

        foreach ($data as $format => $formatCollection) {

            if (!is_array($formatCollection)) {
                continue;
            }

            foreach ($formatCollection as $item) {
                if (array_key_exists($format, Image::$formats)) {
                    $item = $this->create($item, $format);

                    $collection->addImage($item);
                }
            }
        }

        return $collection;
    }
public function createImageCollection ( array $ data = [ ] ) { $ collection = new Images ( ) ; foreach ( $ data as $ format => $ formatCollection ) { if ( ! is_array ( $ formatCollection ) ) { continue ; } foreach ( $ formatCollection as $ item ) { if ( array_key_exists ( $ format , Image :: $ formats ) ) { $ item = $ this -> create ( $ item , $ format ) ; $ collection -> addImage ( $ item ) ; } } } return $ collection ; }
Create full collection

@param  array  $data
@return Images
Create full collection