// Fix HelperUploader images params
This commit is contained in:
@@ -31,13 +31,10 @@ class HelperUploaderCore extends Uploader
|
||||
const DEFAULT_AJAX_TEMPLATE = 'ajax.tpl';
|
||||
|
||||
private $_context;
|
||||
private $_delete_url;
|
||||
private $_display_image;
|
||||
private $_id;
|
||||
private $_image;
|
||||
private $_images;
|
||||
private $_name;
|
||||
private $_multiple;
|
||||
private $_size;
|
||||
protected $_template;
|
||||
private $_template_directory;
|
||||
private $_title;
|
||||
@@ -59,23 +56,6 @@ class HelperUploaderCore extends Uploader
|
||||
return $this->_context;
|
||||
}
|
||||
|
||||
public function setDeleteUrl($value)
|
||||
{
|
||||
$this->_delete_url = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getDeleteUrl()
|
||||
{
|
||||
return $this->_delete_url;
|
||||
}
|
||||
|
||||
public function setDisplayImage($value)
|
||||
{
|
||||
$this->_display_image = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setId($value)
|
||||
{
|
||||
$this->_id = (string)$value;
|
||||
@@ -90,15 +70,18 @@ class HelperUploaderCore extends Uploader
|
||||
return $this->_id;
|
||||
}
|
||||
|
||||
public function setImage($value)
|
||||
public function setImages($value)
|
||||
{
|
||||
$this->_image = $value;
|
||||
$this->_images = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getImage()
|
||||
public function getImages()
|
||||
{
|
||||
return $this->_image;
|
||||
if (!isset($this->_images))
|
||||
$this->_images = array();
|
||||
|
||||
return $this->_images;
|
||||
}
|
||||
|
||||
public function setName($value)
|
||||
@@ -118,17 +101,6 @@ class HelperUploaderCore extends Uploader
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setSize($value)
|
||||
{
|
||||
$this->_size = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getSize()
|
||||
{
|
||||
return $this->_size;
|
||||
}
|
||||
|
||||
public function setTemplate($value)
|
||||
{
|
||||
$this->_template = $value;
|
||||
@@ -234,11 +206,6 @@ class HelperUploaderCore extends Uploader
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function displayImage()
|
||||
{
|
||||
return (isset($this->_display_image) && $this->_display_image);
|
||||
}
|
||||
|
||||
public function isMultiple()
|
||||
{
|
||||
return (isset($this->_multiple) && $this->_multiple);
|
||||
@@ -285,7 +252,6 @@ class HelperUploaderCore extends Uploader
|
||||
|
||||
$this->getContext()->controller->addJs(__PS_BASE_URI__.'/js/vendor/spin.js');
|
||||
$this->getContext()->controller->addJs(__PS_BASE_URI__.'/js/vendor/ladda.js');
|
||||
|
||||
}
|
||||
|
||||
if ($this->useAjax())
|
||||
@@ -300,11 +266,8 @@ class HelperUploaderCore extends Uploader
|
||||
'name' => $this->getName(),
|
||||
'url' => $this->getUrl(),
|
||||
'multiple' => $this->isMultiple(),
|
||||
'display_image' => $this->displayImage(),
|
||||
'image' => $this->getImage(),
|
||||
'images' => $this->getImages(),
|
||||
'thumb' => $this->getThumb(),
|
||||
'size' => $this->getSize(),
|
||||
'delete_url' => $this->getDeleteUrl(),
|
||||
'title' => $this->getTitle()
|
||||
));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user