PHPackages                             rayamedia/yima-widgetator - 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. rayamedia/yima-widgetator

ActiveYima-core-module

rayamedia/yima-widgetator
=========================

Widgetator layout module.

019PHP

Since Jun 24Pushed 10y ago1 watchersCompare

[ Source](https://github.com/YiMAproject/yimaWidgetator)[ Packagist](https://packagist.org/packages/rayamedia/yima-widgetator)[ RSS](/packages/rayamedia-yima-widgetator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Widgetator Layout Module
========================

[](#widgetator-layout-module)

*this module is part of Yima Application Framework*

See it in action
----------------

[](#see-it-in-action)

#### What is widget

[](#what-is-widget)

Widget is a class that implement minimal interface `WidgetInterface`

```
interface WidgetInterface
{
    /**
     * Render widget as string output
     *
     * @return string
     */
    public function render();
}
```

#### Widget plugin manager

[](#widget-plugin-manager)

Widgets stored in widget plugin manager (serviceLocator for widgets). stored with serviceManager key `yimaWidgetator.WidgetManager` and build as factory service.

#### Define widget(s) from merged config

[](#define-widgets-from-merged-config)

```
return array(
    /**
     * Register Widgets in WidgetManager
     *
     * each widget must instance of WidgetInterface
     */
    'yima_widgetator' => [
        // This is configurable service manager config
        'services' => [
            'invokables' => [
                # 'widgetName' => 'Widget\Class',
            ],
            'initializers' => [
                // DB: Using Global db Adapter on each services Implemented AdapterAwareInterface
                function ($instance, $sl) {
                    if ($instance instanceof \Zend\Db\Adapter\AdapterAwareInterface) {
                        $sm = $sl->getServiceLocator();
                        $instance->setDbAdapter(
                            $sm->get('Zend\Db\Adapter\Adapter')
                        );
                    }
                }
            ],
        ],
        'widgets' => [
            /** @see RegionBoxContainer */
            'region_box' => [
                # // $priority default is start with 0
                # $priority => 'WidgetName',
                # $priority => [
                #    'widget' => 'WidgetName'
                #    'params' => [
                #       'with_construct_param' => 'param_value'
                #     ]
                # ],
            ],
        ],
    ],
```

#### How to Get Widgets From ?

[](#how-to-get-widgets-from-)

In Controller with controller helper:

```
$this->layout()->side_bar = $this->widget('widgetName')->render();
```

In View Script:

```

    widget('widgetName')->render();?>

```

#### Load Widgets With Ajax Call

[](#load-widgets-with-ajax-call)

ajax widget loading need some js resources you can find in `www` folder of module, you can put file anywhere you want and edit `config\module.config.php`.

```
return array(
    /**
     * Libraries that used in Ajax Loading of widgets.
     * @see \yimaJquery\View\Helper\WidgetAjaxy
     */
    'static_uri_helper' => array(
        'Yima.Widgetator.JS.Jquery.Ajaxq' => '$basepath/js/yima-widgetator/jquery.ajaxq.min.js',
        'Yima.Widgetator.JS.Jquery.Json'  => '$basepath/js/yima-widgetator/jquery.json.min.js',
    ),
```

for more info around `static_uri_helper` see [yimaStaticUriHelper](https://github.com/RayaMedia/yimaStaticUriHelper)

In View Script:

```

        widgetAjaxy('widgetName',   // widget name
            array('option' => 'value'),         // options
            'container_id',                     // id of dom element
            'function callback(response)'       // callback after loading widget
            );
        ?>

```

*I`m working to improve ajax loading of widgets.*

#### And Finally

[](#and-finally)

We have some Abstract class for widgets called: AbstractWidget and AbstractMvcWidget. (take a look)

Todo
----

[](#todo)

Example Widgets and AbstractClasses will be added.

Installation
------------

[](#installation)

#### Requirement

[](#requirement)

- [yimaStaticUriHelper](https://github.com/RayaMedia/yimaStaticUriHelper)
- [yimaJquery](https://github.com/RayaMedia/yimaJquery)

Composer installation:

require `rayamedia/yima-widgetator` in your `composer.json`

Or clone to modules folder

Enable module in application config

Support
-------

[](#support)

To report bugs or request features, please visit the [Issue Tracker](https://github.com/RayaMedia/yimaWidgetator/issues).

*Please feel free to contribute with new issues, requests and code fixes or new features.*

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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/1f784f9dfb58e36b6a876f3057e5664bb904af71d30bb2023583118138dffe9a?d=identicon)[Payam](/maintainers/Payam)

---

Top Contributors

[![E1101](https://avatars.githubusercontent.com/u/427575?v=4)](https://github.com/E1101 "E1101 (75 commits)")

### Embed Badge

![Health badge](/badges/rayamedia-yima-widgetator/health.svg)

```
[![Health](https://phpackages.com/badges/rayamedia-yima-widgetator/health.svg)](https://phpackages.com/packages/rayamedia-yima-widgetator)
```

PHPackages © 2026

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