Skip to content

Commit

Permalink
v1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
gevorgmansuryan committed Oct 13, 2017
1 parent 654a5b9 commit 4a1ae5a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/LazyBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Gevman\LazyLoad\assets\LazyAsset;
use yii\base\Widget;
use yii\helpers\ArrayHelper;
use yii\helpers\Html;

class LazyBlock extends Widget
Expand All @@ -20,6 +21,7 @@ class LazyBlock extends Widget
public $effect = self::EFFECT_SLIDE_UP;
public $delay = 0;
public $speed = 600;
public $options;

public function init()
{
Expand All @@ -31,7 +33,7 @@ public function init()
public function run()
{
$content = ob_get_clean();
return Html::tag('div', $content, [
return Html::tag('div', $content, ArrayHelper::merge($this->options, [
'id' => $this->id,
'class' => [
'lazy-load-box',
Expand All @@ -49,6 +51,6 @@ public function run()
'delay' => $this->delay,
'speed' => $this->speed
]
]);
]));
}
}

0 comments on commit 4a1ae5a

Please sign in to comment.