public static function fileArrayUpload($value, $returnObject = false)
    {
        if (!empty($value) && is_array($value)) {
            $data = [];
            foreach ($value as $key => $item) {
                $file = static::fileUpload($item['fileId'], true);
                if ($file) {
                    if (!empty($item['caption'])) {
                        $file->caption = $item['caption'];
                    } else {
                        $file->caption = $file->name;
                    }
                    $data[$key] = ($returnObject) ? $file : $file->toArray();
                }
            }
    
            return $data;
        }
    
        return [];
    }
public static function fileArrayUpload($value, $returnObject = false)
    {
        if (!empty($value) && is_array($value)) {
            $data = [];
            foreach ($value as $key => $item) {
                $file = static::fileUpload($item['fileId'], true);
                if ($file) {
                    if (!empty($item['caption'])) {
                        $file->caption = $item['caption'];
                    } else {
                        $file->caption = $file->name;
                    }
                    $data[$key] = ($returnObject) ? $file : $file->toArray();
                }
            }
    
            return $data;
        }
    
        return [];
    }
public static function fileArrayUpload ( $ value , $ returnObject = false ) { if ( ! empty ( $ value ) && is_array ( $ value ) ) { $ data = [ ] ; foreach ( $ value as $ key => $ item ) { $ file = static :: fileUpload ( $ item [ 'fileId' ] , true ) ; if ( $ file ) { if ( ! empty ( $ item [ 'caption' ] ) ) { $ file -> caption = $ item [ 'caption' ] ; } else { $ file -> caption = $ file -> name ; } $ data [ $ key ] = ( $ returnObject ) ? $ file : $ file -> toArray ( ) ; } } return $ data ; } return [ ] ; }
Get the full array for the specific zaa-file-array-upload type

```php
'fileList' => BlockHelper::FileArrayUpload($this->getVarValue('files')),
```

Each array item will have all file query item data and a caption key.

@param string|int $value The specific var or cfg fieldvalue.
@param boolean $returnObject Whether the storage object should be returned or an array.
@return array Returns an array in any case, even an empty array.
Get the full array for the specific zaa - file - array - upload type