src/Generator/Analyzer/Steps/AnalyzeModels.php
protected function getImageResizesForField($fieldId)
    {
        if (    ! array_key_exists('resizes', $this->data->rawData['fields'][ $fieldId ])
            ||  ! count($this->data->rawData['fields'][ $fieldId ]['resizes'])
        ) {
            return [];
        }

        $resizes = [];

        foreach ($this->data->rawData['fields'][ $fieldId ]['resizes'] as $resizeId => $resize) {

            $resizes[] = [
                'resize' => $resizeId,
                'prefix' => $resize['prefix'],
                'width'  => (int) $resize['width'],
                'height' => (int) $resize['height'],
            ];
        }

        // sort resizes.. by prefix name, or by image size?
        uasort($resizes, function ($a, $b) {
            //return $a['width'] * $a['height'] - $b['width'] * $b['height'];
            return strcmp($a['prefix'], $b['prefix']);
        });

        return $resizes;
    }
protected function getImageResizesForField($fieldId)
    {
        if (    ! array_key_exists('resizes', $this->data->rawData['fields'][ $fieldId ])
            ||  ! count($this->data->rawData['fields'][ $fieldId ]['resizes'])
        ) {
            return [];
        }

        $resizes = [];

        foreach ($this->data->rawData['fields'][ $fieldId ]['resizes'] as $resizeId => $resize) {

            $resizes[] = [
                'resize' => $resizeId,
                'prefix' => $resize['prefix'],
                'width'  => (int) $resize['width'],
                'height' => (int) $resize['height'],
            ];
        }

        // sort resizes.. by prefix name, or by image size?
        uasort($resizes, function ($a, $b) {
            //return $a['width'] * $a['height'] - $b['width'] * $b['height'];
            return strcmp($a['prefix'], $b['prefix']);
        });

        return $resizes;
    }
protected function getImageResizesForField ( $ fieldId ) { if ( ! array_key_exists ( 'resizes' , $ this -> data -> rawData [ 'fields' ] [ $ fieldId ] ) || ! count ( $ this -> data -> rawData [ 'fields' ] [ $ fieldId ] [ 'resizes' ] ) ) { return [ ] ; } $ resizes = [ ] ; foreach ( $ this -> data -> rawData [ 'fields' ] [ $ fieldId ] [ 'resizes' ] as $ resizeId => $ resize ) { $ resizes [ ] = [ 'resize' => $ resizeId , 'prefix' => $ resize [ 'prefix' ] , 'width' => ( int ) $ resize [ 'width' ] , 'height' => ( int ) $ resize [ 'height' ] , ] ; } // sort resizes.. by prefix name, or by image size? uasort ( $ resizes , function ( $ a , $ b ) { //return $a['width'] * $a['height'] - $b['width'] * $b['height']; return strcmp ( $ a [ 'prefix' ] , $ b [ 'prefix' ] ) ; } ) ; return $ resizes ; }
Returns data about resizes for an image field

@param int $fieldId
@return array
Returns data about resizes for an image field