From 4a1ae5ae1f1b13e576e4ec15598b4775cda0f2e9 Mon Sep 17 00:00:00 2001 From: Gevorg Mansuryan Date: Fri, 13 Oct 2017 15:43:38 +0400 Subject: [PATCH] v1.1 --- src/LazyBlock.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/LazyBlock.php b/src/LazyBlock.php index a57ce20..36dbcd8 100644 --- a/src/LazyBlock.php +++ b/src/LazyBlock.php @@ -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 @@ -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() { @@ -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', @@ -49,6 +51,6 @@ public function run() 'delay' => $this->delay, 'speed' => $this->speed ] - ]); + ])); } } \ No newline at end of file