Skip to content

Commit fe05b94

Browse files
author
Bohdan Berezhniy
committed
init
1 parent c379877 commit fe05b94

File tree

1 file changed

+11
-2
lines changed
  • Plugin/Frontend/Magento/Catalog/Block/Product/View

1 file changed

+11
-2
lines changed

Plugin/Frontend/Magento/Catalog/Block/Product/View/Gallery.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use Magefan\ProductLabel\Model\Config;
1212
use Magefan\ProductLabel\Model\Parser\Html;
1313
use Magefan\Community\Api\HyvaThemeDetectionInterface;
14+
use Magefan\Community\Api\BreezeThemeDetectionInterface;
1415

1516
class Gallery
1617
{
@@ -24,16 +25,24 @@ class Gallery
2425
*/
2526
protected $hyvaThemeDetection;
2627

28+
/**
29+
* @var BreezeThemeDetectionInterface
30+
*/
31+
protected $breezeThemeDetection;
32+
2733
/**
2834
* @param Config $config
2935
* @param HyvaThemeDetectionInterface $hyvaThemeDetection
36+
* @param BreezeThemeDetectionInterface $breezeThemeDetection
3037
*/
3138
public function __construct(
3239
Config $config,
33-
HyvaThemeDetectionInterface $hyvaThemeDetection
40+
HyvaThemeDetectionInterface $hyvaThemeDetection,
41+
BreezeThemeDetectionInterface $breezeThemeDetection
3442
) {
3543
$this->config = $config;
3644
$this->hyvaThemeDetection = $hyvaThemeDetection;
45+
$this->breezeThemeDetection = $breezeThemeDetection;
3746
}
3847

3948
/**
@@ -46,7 +55,7 @@ public function afterToHtml($subject, $result)
4655
if ($this->config->isEnabled() && ($product = $subject->getProduct())) {
4756
$mfPlComment = Html::COMMENT_PREFIX_GALLERY . $product->getId() . Html::COMMENT_SUFFIX;
4857

49-
if ($this->hyvaThemeDetection->execute()) {
58+
if ($this->hyvaThemeDetection->execute() || $this->breezeThemeDetection->execute()) {
5059
$result = $this->addMfLabelContainerToImageWrapperTag($result, (int)$product->getId());
5160
} else {
5261
if (strpos($result, '<img') !== false) {

0 commit comments

Comments
 (0)