Skip to content

Commit

Permalink
magento/adobe-stock-integration#1833: Add ability to disable renditio…
Browse files Browse the repository at this point in the history
…ns functionality to stores configuration - modifications based on request changes
  • Loading branch information
joweecaquicla committed Sep 16, 2020
1 parent 27f50e4 commit 1de7ccb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
11 changes: 0 additions & 11 deletions app/code/Magento/MediaGalleryRenditions/Model/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class Config
{
private const TABLE_CORE_CONFIG_DATA = 'core_config_data';
private const XML_PATH_ENABLED = 'system/media_gallery/enabled';
private const XML_PATH_MEDIA_GALLERY_RENDITIONS_ENABLED_PATH = 'system/media_gallery_renditions/enabled';
private const XML_PATH_MEDIA_GALLERY_RENDITIONS_WIDTH_PATH = 'system/media_gallery_renditions/width';
private const XML_PATH_MEDIA_GALLERY_RENDITIONS_HEIGHT_PATH = 'system/media_gallery_renditions/height';

Expand Down Expand Up @@ -55,16 +54,6 @@ public function isEnabled(): bool
return $this->scopeConfig->isSetFlag(self::XML_PATH_ENABLED);
}

/**
* Check if the media gallery renditions is enabled
*
* @return bool
*/
public function isMediaGalleryRenditionsEnabled(): bool
{
return $this->scopeConfig->isSetFlag(self::XML_PATH_MEDIA_GALLERY_RENDITIONS_ENABLED_PATH);
}

/**
* Get max width
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function beforeExecute(
$storeId
];

if (!$this->config->isEnabled() || !$this->config->isMediaGalleryRenditionsEnabled()) {
if (!$this->config->isEnabled()) {
return $arguments;
}

Expand Down

0 comments on commit 1de7ccb

Please sign in to comment.