Skip to content

Commit d15a225

Browse files
author
Bohdan Berezhniy
committed
renaming
1 parent f752962 commit d15a225

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Model/Config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function getIsJavascriptLazyLoadMethod(): bool
7878
/**
7979
* @return bool
8080
*/
81-
public function getIsAllBlocksAddedToLazy(): bool
81+
public function isAllBlocksAddedToLazy(): bool
8282
{
8383
return (BlocksToLazyLoad::ALL === (int)$this->getConfig(self::XML_PATH_LAZY_BLOCKS_TO_LAZY_LOAD));
8484
}

Plugin/BlockPlugin.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ private function prepareForJsLazyLoad($block, string $html): string
146146
* @param string $html
147147
* @return string
148148
*/
149-
private function prepareForNativeBrowserLazyLoad(string $html) :string
149+
protected function prepareForNativeBrowserLazyLoad(string $html) :string
150150
{
151151
return preg_replace(self::PATTERN, '<img src="$2" $1 $3 loading="lazy" />', $html);
152152
}
@@ -177,7 +177,7 @@ protected function getBlockIdentifier(\Magento\Framework\View\Element\AbstractBl
177177
* @param int $numberOfReplacements
178178
* @return string
179179
*/
180-
private function removeLoadingLazyAttributeFromFirstNImages(string $html, int $numberOfReplacements):string
180+
protected function removeLoadingLazyAttributeFromFirstNImages(string $html, int $numberOfReplacements):string
181181
{
182182
$position = 0;
183183

@@ -225,7 +225,7 @@ protected function isEnabled($block, string $html): bool
225225
return false;
226226
}
227227

228-
if ($this->config->getIsAllBlocksAddedToLazy() && !$this->isBlockSkiped($block)) {
228+
if ($this->config->isAllBlocksAddedToLazy() && !$this->isBlockSkiped($block)) {
229229
return true;
230230
}
231231

0 commit comments

Comments
 (0)