1111use Magefan \ProductLabel \Model \Config ;
1212use Magefan \ProductLabel \Model \Parser \Html ;
1313use Magefan \Community \Api \HyvaThemeDetectionInterface ;
14+ use Magefan \Community \Api \BreezeThemeDetectionInterface ;
1415
1516class 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