MatisseComponents/Dropzone.php
private function getImagesInFieldValue($value)
  {
    $aImages = explode(',', $value);
    $arrImages = [];
    foreach ($aImages as $aImage)
    {
      $oImage = File::where('path',$aImage)->first();
      if (!$oImage) continue;
      $fileName = "$oImage->name.$oImage->ext";
      $arrImages[] = [
        'filename' => $fileName,
        'virtuaPath' => $oImage->path,
        'path' => $oImage->image ? $this->contentRepository->getImageUrl($oImage->path,[
          'w' => 120,
          'h' => 120,
          'fit' => 'crop',
        ]) : $this->contentRepository->getFileUrl($oImage->path),
        'pathDownload' => ($oImage->image ? $this->contentRepository->getImageUrl($oImage->path) : $this->contentRepository->getFileUrl($oImage->path))."?f=".$fileName,
        'icon' => !$oImage->image ? $this->props->genericIconPath : ''
      ];
    }
    return $arrImages;
  }
private function getImagesInFieldValue($value)
  {
    $aImages = explode(',', $value);
    $arrImages = [];
    foreach ($aImages as $aImage)
    {
      $oImage = File::where('path',$aImage)->first();
      if (!$oImage) continue;
      $fileName = "$oImage->name.$oImage->ext";
      $arrImages[] = [
        'filename' => $fileName,
        'virtuaPath' => $oImage->path,
        'path' => $oImage->image ? $this->contentRepository->getImageUrl($oImage->path,[
          'w' => 120,
          'h' => 120,
          'fit' => 'crop',
        ]) : $this->contentRepository->getFileUrl($oImage->path),
        'pathDownload' => ($oImage->image ? $this->contentRepository->getImageUrl($oImage->path) : $this->contentRepository->getFileUrl($oImage->path))."?f=".$fileName,
        'icon' => !$oImage->image ? $this->props->genericIconPath : ''
      ];
    }
    return $arrImages;
  }
private function getImagesInFieldValue ( $ value ) { $ aImages = explode ( ',' , $ value ) ; $ arrImages = [ ] ; foreach ( $ aImages as $ aImage ) { $ oImage = File :: where ( 'path' , $ aImage ) -> first ( ) ; if ( ! $ oImage ) continue ; $ fileName = "$oImage->name.$oImage->ext" ; $ arrImages [ ] = [ 'filename' => $ fileName , 'virtuaPath' => $ oImage -> path , 'path' => $ oImage -> image ? $ this -> contentRepository -> getImageUrl ( $ oImage -> path , [ 'w' => 120 , 'h' => 120 , 'fit' => 'crop' , ] ) : $ this -> contentRepository -> getFileUrl ( $ oImage -> path ) , 'pathDownload' => ( $ oImage -> image ? $ this -> contentRepository -> getImageUrl ( $ oImage -> path ) : $ this -> contentRepository -> getFileUrl ( $ oImage -> path ) ) . "?f=" . $ fileName , 'icon' => ! $ oImage -> image ? $ this -> props -> genericIconPath : '' ] ; } return $ arrImages ; }
Private function to get all uploaded images in this dropzone
@param $value
@return array
Private function to get all uploaded images in this dropzone