19 protected $_template =
'Magento_Swatches::catalog/product/attribute/visual.phtml';
38 $swatchStoreValue =
null;
40 if (isset($storeValues[
'swatch'])) {
41 $swatchStoreValue = $storeValues[
'swatch'];
48 if (isset($swatchStoreValue[
$optionId])) {
53 if (isset($swatchStoreValue[
$optionId])) {
75 'uploadActionUrl' => $this->
getUrl(
'swatches/iframe/show'),
77 'isReadOnly' => (
int)$this->getReadOnly()
80 return json_encode(
$data);
92 if ($swatchStoreValue ===
null) {
96 foreach ($swatchStoreValue as $key =>
$value) {
98 $newSwatch[$key] =
'background: '.$value;
100 $mediaUrl = $this->swatchHelper->getSwatchMediaUrl();
101 $newSwatch[$key] =
'background: url('.$mediaUrl.$value.
'); background-size: cover;';
elseif(isset( $params[ 'redirect_parent']))
getStoreOptionValues($storeId)
getUrl($route='', $params=[])
createStoreValues($storeId, $optionId)
reformatSwatchLabels($swatchStoreValue=null)
canManageOptionDefaultOnly()