PHPackages                             z\_bodya/yii-gallery-manager - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. z\_bodya/yii-gallery-manager

ActiveYii-extension

z\_bodya/yii-gallery-manager
============================

Extension for yii, that allows to manage image galleries

67982[1 PRs](https://github.com/zxbodya/yii-gallery-manager/pulls)PHP

Since Dec 17Pushed 11y ago1 watchersCompare

[ Source](https://github.com/zxbodya/yii-gallery-manager)[ Packagist](https://packagist.org/packages/z_bodya/yii-gallery-manager)[ RSS](/packages/z-bodya-yii-gallery-manager/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

Gallery Manager usage instructions
==================================

[](#gallery-manager-usage-instructions)

Manual
------

[](#manual)

1. Checkout source code to your project, for example to ext.galleryManager.
2. Install and configure image component([https://bitbucket.org/z\_bodya/yii-image](https://bitbucket.org/z_bodya/yii-image)).
3. Import gallery models to project, by adding "ext.galleryManager.models.\*" to import in config/main.php
4. Add GalleryController to application or module controllerMap.
5. Configure and save gallery model

    ```
     :::php
     $gallery = new Gallery();
     $gallery->name = true;
     $gallery->description = true;
     $gallery->versions = array(
         'small' => array(
             'resize' => array(200, null),
         ),
         'medium' => array(
             'resize' => array(800, null),
         )
     );
     $gallery->save();

    ```
6. Render widget for gallery created above:

    ```
     :::php
     $this->widget('GalleryManager', array(
         'gallery' => $gallery,
         'controllerRoute' => '/admin/gallery', //route to gallery controller
     ));

    ```

Using GalleryBehavior
---------------------

[](#using-gallerybehavior)

Using gallery behavior is possible to add gallery to any model in application.

To use GalleryBehavior:

1. Add it to your model:

    ```
     Example:
     public function behaviors()
     {
         return array(
             'galleryBehavior' => array(
                 'class' => 'GalleryBehavior',
                 'idAttribute' => 'gallery_id',
                 'versions' => array(
                     'small' => array(
                         'centeredpreview' => array(98, 98),
                     ),
                     'medium' => array(
                         'resize' => array(800, null),
                     )
                 ),
                 'name' => true,
                 'description' => true,
             )
         );
     }

    ```
2. Add gallery widget to your view:

    ```
     Example:
     Product galley

    ```

Changing image versions for gallery associated with behavior
------------------------------------------------------------

[](#changing-image-versions-for-gallery-associated-with-behavior)

1. Update your model with new versions configuration
2. Run following code(best place for it - in migration):

    ```
     :::php
     $models = Model::model()->findAll();
     foreach($models as $model) $model->galleryBehavior->changeConfig();

    ```

Note: to run in migration you should define 'webroot' path alias.

###  Health Score

26

—

LowBetter than 46% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/3f47929617cbb1dee5a095baccb865ab5e30ad7155f5b30b081b50249806593d?d=identicon)[zxbodya](/maintainers/zxbodya)

---

Top Contributors

[![zxbodya](https://avatars.githubusercontent.com/u/446117?v=4)](https://github.com/zxbodya "zxbodya (39 commits)")[![mrfatguy](https://avatars.githubusercontent.com/u/2903392?v=4)](https://github.com/mrfatguy "mrfatguy (2 commits)")

### Embed Badge

![Health badge](/badges/z-bodya-yii-gallery-manager/health.svg)

```
[![Health](https://phpackages.com/badges/z-bodya-yii-gallery-manager/health.svg)](https://phpackages.com/packages/z-bodya-yii-gallery-manager)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
