Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE: merge images from child to configurable #24

Closed
108 changes: 95 additions & 13 deletions Entity/AkeneoSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,28 @@ class AkeneoSettings extends Transport
private $priceList;

/**
* @var ParameterBag
* @var string
*
* @ORM\Column(name="akeneo_attributes_list", type="text", nullable=true)
*/
private $akeneoAttributesList;

/**
* @var string
*
* @ORM\Column(name="akeneo_attributes_image_list", type="text", nullable=true)
*/
private $akeneoAttributesImageList;

/**
* @var boolean
*
* @ORM\Column(name="akeneo_merge_image_to_parent", type="boolean", options={"default":"false"})
*/
private $akeneoMergeImageToParent = false;

/**
* @var ParameterBagisAkeneoMergeImageToParent
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo

*/
private $settings;

Expand Down Expand Up @@ -224,19 +245,20 @@ public function getSettingsBag()
if (null === $this->settings) {
$this->settings = new ParameterBag(
[
'clientId' => $this->getClientId(),
'secret' => $this->getSecret(),
'akeneoChannels' => $this->getAkeneoChannels(),
'akeneoActiveChannel' => $this->getAkeneoActiveChannel(),
'username' => $this->getUsername(),
'password' => $this->getPassword(),
'token' => $this->getToken(),
'refreshToken' => $this->getRefreshToken(),
'syncProducts' => $this->getSyncProducts(),
'akeneoCurrencies' => $this->getAkeneoCurrencies(),
'clientId' => $this->getClientId(),
'secret' => $this->getSecret(),
'akeneoChannels' => $this->getAkeneoChannels(),
'akeneoActiveChannel' => $this->getAkeneoActiveChannel(),
'username' => $this->getUsername(),
'password' => $this->getPassword(),
'token' => $this->getToken(),
'refreshToken' => $this->getRefreshToken(),
'syncProducts' => $this->getSyncProducts(),
'akeneoCurrencies' => $this->getAkeneoCurrencies(),
'akeneoActiveCurrencies' => $this->getAkeneoActiveCurrencies(),
'akeneoLocales' => $this->getAkeneoLocales()->toArray(),
'akeneoLocalesList' => $this->getAkeneoLocalesList(),
'akeneoLocales' => $this->getAkeneoLocales()->toArray(),
'akeneoLocalesList' => $this->getAkeneoLocalesList(),
'akeneoAttributesList' => $this->getAkeneoAttributesList(),
]
);
}
Expand Down Expand Up @@ -506,6 +528,46 @@ public function setAkeneoLocalesList(array $akeneoLocalesList = null)
return $this;
}

/**
* @return string|null
*/
public function getAkeneoAttributesList(): ?string
{
return $this->akeneoAttributesList;
}

/**
* @param string $attributeList
*
* @return $this
*/
public function setAkeneoAttributesList($attributeList)
{
$this->akeneoAttributesList = $attributeList;

return $this;
}

/**
* @return string|null
*/
public function getAkeneoAttributesImageList(): ?string
dxops marked this conversation as resolved.
Show resolved Hide resolved
{
return $this->akeneoAttributesImageList;
}

/**
* @param string $akeneoAttributesImageList
*
* @return $this
*/
public function setAkeneoAttributesImageList($akeneoAttributesImageList)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add typehint and return type please

{
$this->akeneoAttributesImageList = $akeneoAttributesImageList;

return $this;
}

/**
* @return string
*/
Expand Down Expand Up @@ -607,4 +669,24 @@ public function setPriceList(PriceList $priceList): self

return $this;
}

/**
* @return bool
*/
public function isAkeneoMergeImageToParent(): ?bool
{
return $this->akeneoMergeImageToParent;
}

/**
* @param bool $akeneoMergeImageToParent
*
* @return $this
*/
public function setAkeneoMergeImageToParent(bool $akeneoMergeImageToParent)
{
$this->akeneoMergeImageToParent = $akeneoMergeImageToParent;

return $this;
}
}
Loading