OXID eShop CE  4.9.6
 All Classes Files Functions Variables Pages
oxPictureHandler Class Reference
+ Inheritance diagram for oxPictureHandler:
+ Collaboration diagram for oxPictureHandler:

Public Member Functions

 deleteArticleMasterPicture ($oObject, $iIndex, $blDeleteMasterPicture=true)
 deleteMainIcon ($oObject)
 deleteThumbnail ($oObject)
 deleteZoomPicture ($oObject, $iIndex)
 getIconName ($sFilename)
 getMainIconName ($sMasterImageFile)
 getThumbName ($sMasterImageFile)
 getZoomName ($sMasterImageFile, $iIndex)
 getImageSize ($aImgSizes, $sIndex=null)
 getAltImageUrl ($sFilePath, $sFile, $blSSL=null)
 getPicUrl ($sPath, $sFile, $sSize, $sIndex=null, $sAltPath=false, $bSsl=null)
 getProductPicUrl ($sPath, $sFile, $sSize, $sIndex=null, $bSsl=null)
- Public Member Functions inherited from oxSuperCfg
 __call ($sMethod, $aArgs)
 __construct ()
 getConfig ()
 setConfig ($oConfig)
 getSession ()
 setSession ($oSession)
 getUser ()
 setUser ($oUser)
 isAdmin ()
 setAdminMode ($blAdmin)

Protected Member Functions

 _getBaseMasterImageFileName ($sMasterImageFile)
 _getPictureInfo ($sFilePath, $sFile, $blAdmin=false, $blSSL=null, $iLang=null, $iShopId=null)

Additional Inherited Members

- Static Protected Attributes inherited from oxSuperCfg
static $_oConfig = null
static $_oSession = null
static $_oRights = null
static $_oActUser = null
static $_blIsAdmin = null

Detailed Description

class for pictures processing

Definition at line 6 of file oxpicturehandler.php.

Member Function Documentation

oxPictureHandler::_getBaseMasterImageFileName (   $sMasterImageFile)
protected

Gets master image file name and removes suffics (e.g. _p1) from file end.

Parameters
string$sMasterImageFilemaster image file name
Returns
null

Definition at line 190 of file oxpicturehandler.php.

oxPictureHandler::_getPictureInfo (   $sFilePath,
  $sFile,
  $blAdmin = false,
  $blSSL = null,
  $iLang = null,
  $iShopId = null 
)
protected

Returns dir/url info for given image file

Parameters
string$sFilePathpath to file
string$sFilefilename in pictures dir
bool$blAdminis admin mode ?
bool$blSSLis ssl ?
int$iLanglanguage id
int$iShopIdshop id
Returns
array

Definition at line 233 of file oxpicturehandler.php.

oxPictureHandler::deleteArticleMasterPicture (   $oObject,
  $iIndex,
  $blDeleteMasterPicture = true 
)

Deletes master picture and all images generated from it. If third parameter is false, skips master image delete, only all generated images will be deleted.

Parameters
oxArticle$oObjectarticle object
int$iIndexmaster picture index
bool$blDeleteMasterPicturedelete master picture, default is true
Returns
null

Definition at line 20 of file oxpicturehandler.php.

oxPictureHandler::deleteMainIcon (   $oObject)

Deletes custom main icon, which name is specified in oxicon field.

Parameters
oxArticle$oObjectarticle object

Definition at line 80 of file oxpicturehandler.php.

oxPictureHandler::deleteThumbnail (   $oObject)

Deletes custom thumbnail, which name is specified in oxthumb field.

Parameters
oxArticle$oObjectarticle object

Definition at line 93 of file oxpicturehandler.php.

oxPictureHandler::deleteZoomPicture (   $oObject,
  $iIndex 
)

Deletes custom zoom picture, which name is specified in oxzoom field.

Parameters
oxArticle$oObjectarticle object
int$iIndexzoom picture index
Returns
null

Definition at line 110 of file oxpicturehandler.php.

oxPictureHandler::getAltImageUrl (   $sFilePath,
  $sFile,
  $blSSL = null 
)

Returns alternative image url

Parameters
string$sFilePathpath to file
string$sFilefilename in pictures dir
bool$blSSLis ssl ?
Returns
string

Definition at line 261 of file oxpicturehandler.php.

oxPictureHandler::getIconName (   $sFilename)

Returns article picture icon name for selected article picture

Parameters
string$sFilenamefile name
Returns
string

Definition at line 141 of file oxpicturehandler.php.

oxPictureHandler::getImageSize (   $aImgSizes,
  $sIndex = null 
)

Returns image sizes from provided config array

Parameters
mixed$aImgSizesarray or string of sizes in format x*y
string$sIndexindex in array
Returns
array

Definition at line 203 of file oxpicturehandler.php.

oxPictureHandler::getMainIconName (   $sMasterImageFile)

Returns article main icon name generated from master picture

Parameters
string$sMasterImageFilemaster image file name
Returns
string

Definition at line 153 of file oxpicturehandler.php.

oxPictureHandler::getPicUrl (   $sPath,
  $sFile,
  $sSize,
  $sIndex = null,
  $sAltPath = false,
  $bSsl = null 
)

Returns requested picture url. If image is not available - returns false

Parameters
string$sPathpath from pictures/master/
string$sFilepicture file name
string$sSizepicture sizes (x, y)
string$sIndexpicture index [optional]
string$sAltPathalternative picture path [optional]
bool$bSslWhether to force SSL
Returns
string | bool

Definition at line 303 of file oxpicturehandler.php.

oxPictureHandler::getProductPicUrl (   $sPath,
  $sFile,
  $sSize,
  $sIndex = null,
  $bSsl = null 
)

Returns requested product picture url. If image is not available - returns url to nopic.jpg

Parameters
string$sPathpath from pictures/master/
string$sFilepicture file name
string$sSizepicture sizes (x, y)
string$sIndexpicture index [optional]
bool$bSslWhether to force SSL
Returns
string | bool

Definition at line 329 of file oxpicturehandler.php.

oxPictureHandler::getThumbName (   $sMasterImageFile)

Returns thumb image name generated from master picture

Parameters
string$sMasterImageFilemaster image file name
Returns
string

Definition at line 165 of file oxpicturehandler.php.

oxPictureHandler::getZoomName (   $sMasterImageFile,
  $iIndex 
)

Returns zoom image name generated from master picture

Parameters
string$sMasterImageFilemaster image file name
string$iIndexmaster image index
Returns
string

Definition at line 178 of file oxpicturehandler.php.


The documentation for this class was generated from the following file: