%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/bbw/farmaci/kritik-portale/module/ReviewBase/src/ReviewBase/Traits/
Upload File :
Create Path :
Current File : /var/www/html/bbw/farmaci/kritik-portale/module/ReviewBase/src/ReviewBase/Traits/GalleryTrait.php

<?php

/**
 * GalleryTrait
 *
 * @author Rene Winkler ( conlabz GmbH ) <rene.winkler@conlabz.de>
 */

namespace ReviewBase\Traits;

use Zend\Json\Json;

trait GalleryTrait {

    public function setGallery($gallery)
    {
        if($this->image_gallery_count > 0)
        {
            return $gallery;
        }
    }

    public function getGallery($gallery, $asJson)
    {
        if($asJson){
            return $gallery;
        } else {
            $gallery = Json::decode($gallery);
            $gallery = is_null($gallery) ? array() : $gallery;
            return array_slice($gallery, 0, $this->image_gallery_count);
        }
    }
}

Zerion Mini Shell 1.0