classes/item/MainItem.php
protected function getUploadFileListField($sField, $sFakeField)
    {
        $arFileList = $this->getAttribute($sField);
        if (!empty($arFileList)) {
            return $arFileList;
        }

        $arFileList = [];

        $arCachedFileList = (array) $this->getAttribute($sFakeField);
        foreach ($arCachedFileList as $arFileData) {
            $obFile = $this->initUploadFileObject($arFileData);
            if (empty($obFile)) {
                continue;
            }

            $arFileList[] = $obFile;
        }

        $this->setAttribute($sField, $arFileList);

        return $arFileList;
    }
protected function getUploadFileListField($sField, $sFakeField)
    {
        $arFileList = $this->getAttribute($sField);
        if (!empty($arFileList)) {
            return $arFileList;
        }

        $arFileList = [];

        $arCachedFileList = (array) $this->getAttribute($sFakeField);
        foreach ($arCachedFileList as $arFileData) {
            $obFile = $this->initUploadFileObject($arFileData);
            if (empty($obFile)) {
                continue;
            }

            $arFileList[] = $obFile;
        }

        $this->setAttribute($sField, $arFileList);

        return $arFileList;
    }
protected function getUploadFileListField ( $ sField , $ sFakeField ) { $ arFileList = $ this -> getAttribute ( $ sField ) ; if ( ! empty ( $ arFileList ) ) { return $ arFileList ; } $ arFileList = [ ] ; $ arCachedFileList = ( array ) $ this -> getAttribute ( $ sFakeField ) ; foreach ( $ arCachedFileList as $ arFileData ) { $ obFile = $ this -> initUploadFileObject ( $ arFileData ) ; if ( empty ( $ obFile ) ) { continue ; } $ arFileList [ ] = $ obFile ; } $ this -> setAttribute ( $ sField , $ arFileList ) ; return $ arFileList ; }
Get image object form field with image array
@param string $sField
@param string $sFakeField
@return File[]|null
Get image object form field with image array