12345678910111213141516171819202122232425262728293031 |
- <?php
- namespace app\models\front;
- use app\forks\galleryManager\GalleryBehavior;
- use Yii;
- class Gallery extends \app\models\base\Gallery
- {
- public function behaviors()
- {
- return [
- 'galleryBehavior' => [
- 'class' => GalleryBehavior::className(),
- 'type' => 'post_gallery',
- 'extension' => 'jpg',
- 'directory' => Yii::getAlias('@webroot') . '/images/post_gallery/gallery',
- 'url' => Yii::getAlias('@web') . '/images/post_gallery/gallery',
- 'versions' => [
- 'small' => function ($img) {
- /** @var \Imagine\Image\ImageInterface $img */
- return $img;
- },
- 'medium' => function ($img) {
- return $img;
- },
- ]
- ]
- ];
- }
- }
|