GalleryWidget.php 570 Bytes
<?php
    
    namespace artbox\core\widgets;
    
    use artbox\core\behaviors\GalleryBehavior;
    use yii\base\Widget;
    
    /**
     * Class GalleryWidget
     *
     * @package artbox\core\widgets
     *
     * @property GalleryBehavior $model
     */
    class GalleryWidget extends Widget
    {
        public $model;
        
        public function run()
        {
            return $this->render(
                '_gallery_view',
                [
                    'images' => $this->model->getImages(),
                ]
            );
        }
    }