|
@@ -149,10 +149,10 @@ discard block |
|
|
block discarded – undo |
|
149
|
149
|
*/ |
|
150
|
150
|
public function run() |
|
151
|
151
|
{ |
|
152
|
|
- $class = ($this->placeholderSrc ? 'lazyimage-wrapper' : 'lazy-image') . ' ' . $this->extraClass; |
|
|
152
|
+ $class = ($this->placeholderSrc ? 'lazyimage-wrapper' : 'lazy-image').' '.$this->extraClass; |
|
153
|
153
|
|
|
154
|
154
|
if ($this->placeholderSrc && $this->placeholderAsBase64) { |
|
155
|
|
- $this->placeholderSrc = 'data:image/jpg;base64,' . base64_encode(file_get_contents($this->placeholderSrc)); |
|
|
155
|
+ $this->placeholderSrc = 'data:image/jpg;base64,'.base64_encode(file_get_contents($this->placeholderSrc)); |
|
156
|
156
|
} |
|
157
|
157
|
|
|
158
|
158
|
if ($this->attributesOnly && !$this->placeholderSrc) { |
|
@@ -160,14 +160,14 @@ discard block |
|
|
block discarded – undo |
|
160
|
160
|
} |
|
161
|
161
|
|
|
162
|
162
|
if ($this->placeholderSrc) { |
|
163
|
|
- $tag = '<div class="' . $class . '">'; |
|
|
163
|
+ $tag = '<div class="'.$class.'">'; |
|
164
|
164
|
$tag .= Html::tag('img', '', ['class' => 'lazy-image lazyimage', 'data-src' => $this->src]); |
|
165
|
165
|
$tag .= Html::tag('img', '', ['class' => 'lazyimage-placeholder-image', 'src' => $this->placeholderSrc]); |
|
166
|
|
- $tag .= '<noscript><img class="lazyimage-image" src="' . $this->src . '" /></noscript>'; |
|
|
166
|
+ $tag .= '<noscript><img class="lazyimage-image" src="'.$this->src.'" /></noscript>'; |
|
167
|
167
|
$tag .= '</div>'; |
|
168
|
168
|
} else { |
|
169
|
169
|
$tag = Html::tag('img', '', ['class' => $class, 'data-src' => $this->src, 'data-width' => $this->width, 'data-height' => $this->height]); |
|
170
|
|
- $tag .= '<div class="lazy-placeholder ' . $class .'"><div style="height: 0px; padding-bottom: 75%;"></div><div class="loader"></div></div>'; |
|
|
170
|
+ $tag .= '<div class="lazy-placeholder '.$class.'"><div style="height: 0px; padding-bottom: 75%;"></div><div class="loader"></div></div>'; |
|
171
|
171
|
$tag .= '<noscript><img class="'.$class.'" src="'.$this->src.'" /></noscript>'; |
|
172
|
172
|
} |
|
173
|
173
|
|