Skip to content

Commit

Permalink
added property
Browse files Browse the repository at this point in the history
  • Loading branch information
sreichel committed Sep 26, 2024
1 parent ae19574 commit b9a8b7e
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions app/code/core/Mage/ConfigurableSwatches/Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@ class Mage_ConfigurableSwatches_Helper_Data extends Mage_Core_Helper_Abstract
protected $_moduleName = 'Mage_ConfigurableSwatches';

protected $_enabled = null;

protected $_configAttributeIds = null;

protected ?array$_configAttributeIdsUsesColorPicker = null;

/**
* Is the extension enabled?
*
Expand Down Expand Up @@ -102,18 +105,16 @@ public function getSwatchAttributeIds()

/**
* Get list of attributes that should use swatches
*
* @return array
*/
public function getSwatchAttributeIdsUsesColorPicker()
public function getSwatchAttributeIdsUsesColorPicker(): ?array
{
if (is_null($this->_configAttributeIds)) {
$this->_configAttributeIds = [];
if (is_null($this->_configAttributeIdsUsesColorPicker)) {
$this->_configAttributeIdsUsesColorPicker = [];
if (Mage::getStoreConfig(self::CONFIG_PATH_SWATCH_ATTRIBUTES_COLORPICKER)) {
$this->_configAttributeIds = explode(',', Mage::getStoreConfig(self::CONFIG_PATH_SWATCH_ATTRIBUTES_COLORPICKER));
$this->_configAttributeIdsUsesColorPicker = explode(',', Mage::getStoreConfig(self::CONFIG_PATH_SWATCH_ATTRIBUTES_COLORPICKER));
}
}
return $this->_configAttributeIds;
return $this->_configAttributeIdsUsesColorPicker;
}

/**
Expand Down

0 comments on commit b9a8b7e

Please sign in to comment.