Skip to content

Latest commit

 

History

History
595 lines (288 loc) · 15.9 KB

class.WebserviceSpecificManagementImagesCore.md

File metadata and controls

595 lines (288 loc) · 15.9 KB

Class WebserviceSpecificManagementImagesCore

2007-2015 PrestaShop

NOTICE OF LICENSE

This source file is subject to the Open Software License (OSL 3.0) that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://opensource.org/licenses/osl-3.0.php If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately.

DISCLAIMER

Do not edit or add to this file if you wish to upgrade PrestaShop to newer versions in the future. If you wish to customize PrestaShop for your needs please refer to http://www.prestashop.com for more information.

Contents

Properties

Methods

Properties

$acceptedImgMimeTypes

protected array $acceptedImgMimeTypes = array('image/gif', 'image/jpg', 'image/jpeg', 'image/pjpeg', 'image/png', 'image/x-png')

$defaultImage

protected boolean $defaultImage = false

$imageResource

public mixed $imageResource = null

$imageType

protected string $imageType = null

$imageTypes

protected array $imageTypes = array('general' => array('header' => array(), 'mail' => array(), 'invoice' => array(), 'store_icon' => array()), 'products' => array(), 'categories' => array(), 'manufacturers' => array(), 'suppliers' => array(), 'stores' => array(), 'customizations' => array())

$imgExtension

protected string $imgExtension

$imgMaxUploadSize

protected integer $imgMaxUploadSize = 3000000

$imgToDisplay

public string $imgToDisplay = null

$objOutput

protected \WebserviceOutputBuilder $objOutput

$output

protected mixed $output

$productImageDeclinationId

protected string $productImageDeclinationId = null

$wsObject

protected \WebserviceRequest $wsObject

Methods

deleteImageOnDisk

boolean WebserviceSpecificManagementImagesCore::deleteImageOnDisk(string $file_path, array $image_types, string $parent_path)

Delete the image on disk

Arguments

  • $file_path string - the image file path
  • $image_types array - The different sizes
  • $parent_path string - The parent path

getContent

mixed WebserviceSpecificManagementImagesCore::getContent()

This must be return an array with specific values as WebserviceRequest expects.

getCustomizations

mixed WebserviceSpecificManagementImagesCore::getCustomizations()

getObjectOutput

mixed WebserviceSpecificManagementImagesCore::getObjectOutput()

getWsObject

mixed WebserviceSpecificManagementImagesCore::getWsObject()

manage

mixed WebserviceSpecificManagementImagesCore::manage()

manageCustomizationImages

mixed WebserviceSpecificManagementImagesCore::manageCustomizationImages()

manageDeclinatedImages

boolean WebserviceSpecificManagementImagesCore::manageDeclinatedImages(string $directory)

Management of normal images (as categories, suppliers, manufacturers and stores)

Arguments

  • $directory string - the file path of the root of the images folder type

manageDeclinatedImagesCRUD

boolean WebserviceSpecificManagementImagesCore::manageDeclinatedImagesCRUD(boolean $filename_exists, string $filename, array $image_sizes, string $directory)

Management of normal images CRUD

Arguments

  • $filename_exists boolean - if the filename exists
  • $filename string - the image path
  • $image_sizes array - The
  • $directory string

manageDefaultDeclinatedImages

mixed WebserviceSpecificManagementImagesCore::manageDefaultDeclinatedImages($directory, $normal_image_sizes)

Arguments

  • $directory mixed
  • $normal_image_sizes mixed

manageEntityDeclinatedImages

mixed WebserviceSpecificManagementImagesCore::manageEntityDeclinatedImages($directory, $normal_image_sizes)

Arguments

  • $directory mixed
  • $normal_image_sizes mixed

manageGeneralImages

boolean WebserviceSpecificManagementImagesCore::manageGeneralImages()

Management of general images

manageImages

boolean WebserviceSpecificManagementImagesCore::manageImages()

Management of images URL segment

manageListDeclinatedImages

mixed WebserviceSpecificManagementImagesCore::manageListDeclinatedImages($directory, $normal_image_sizes)

Arguments

  • $directory mixed
  • $normal_image_sizes mixed

manageProductImages

mixed WebserviceSpecificManagementImagesCore::manageProductImages()

setObjectOutput

\WebserviceSpecificManagementInterface WebserviceSpecificManagementImagesCore::setObjectOutput(\WebserviceOutputBuilderCore $obj)

Arguments

setWsObject

mixed WebserviceSpecificManagementImagesCore::setWsObject(\WebserviceRequestCore $obj)

Arguments

writeImageOnDisk

string WebserviceSpecificManagementImagesCore::writeImageOnDisk(string $base_path, string $new_path, integer $dest_width, integer $dest_height, array $image_types, string $parent_path)

Write the image on disk

Arguments

  • $base_path string
  • $new_path string
  • $dest_width integer
  • $dest_height integer
  • $image_types array
  • $parent_path string

writePostedImageOnDisk

boolean WebserviceSpecificManagementImagesCore::writePostedImageOnDisk(string $reception_path, integer $dest_width, integer $dest_height, array $image_types, string $parent_path)

Write the posted image on disk

Arguments

  • $reception_path string
  • $dest_width integer
  • $dest_height integer
  • $image_types array
  • $parent_path string