PHPackages                             symedit/widget-bundle - 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. [Templating &amp; Views](/categories/templating)
4. /
5. symedit/widget-bundle

ActiveSymfony-bundle[Templating &amp; Views](/categories/templating)

symedit/widget-bundle
=====================

Provides re-usable widgets in templating

v0.11(10y ago)012PHP

Since Apr 18Pushed 9y ago1 watchersCompare

[ Source](https://github.com/symedit/WidgetBundle)[ Packagist](https://packagist.org/packages/symedit/widget-bundle)[ RSS](/packages/symedit-widget-bundle/feed)WikiDiscussions master Synced 5d ago

READMEChangelogDependenciesVersions (21)Used By (0)

SymEdit Widget Bundle
=====================

[](#symedit-widget-bundle)

Configuration

```
symedit_widget:
    driver:               doctrine/orm

    # Fragment stategy to use
    fragment:
        strategy:             inline
    classes:
        widget:
            model:                SymEdit\Bundle\WidgetBundle\Model\Widget
            controller:           SymEdit\Bundle\WidgetBundle\Controller\WidgetController
            respository:          ~
            form:                 SymEdit\Bundle\WidgetBundle\Form\Type\WidgetType
        widget_area:
            model:                SymEdit\Bundle\WidgetBundle\Model\WidgetArea
            repository:           ~
            form:                 SymEdit\Bundle\WidgetBundle\Form\Type\WidgetAreaType
```

Creating a Strategy
-------------------

[](#creating-a-strategy)

Build your strategy class:

```
namespace SymEdit\Bundle\WidgetBundle\Widget\Strategy;

use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

class MyStrategy extends AbstractWidgetStrategy
{
    public function execute(WidgetInterface $widget)
    {
        return $this->render($widget, array(
            'number' => $widget->getOption('number'),
        ));
    }

    public function getDefaultOptions(OptionsResolver $resolver)
    {
        $resolver->setDefaults(array(
            'template' => 'MyBundle:Widget:mywidget.html.twig',
            'number' => 5,
        ));
    }

    /**
     * Return array of options to pass to Response::setCache,
     * if it should not be cached return array('private' => true)
     */
    public function getCacheOptions(WidgetInterface $widget)
    {
        return array(
            'public' => true,
            'last_modified' => $widget->getUpdatedAt(),
        );
    }

    public function buildForm(FormBuilderInterface $builder)
    {
        $builder
            ->add('number', 'integer')
        ;
    }

    public function getName()
    {
        return 'number';
    }

    public function getDescription()
    {
        return 'widget.number'; // Translated
    }
}
```

Add it to your services:

```

```

Rendering Widgets
-----------------

[](#rendering-widgets)

This renders a widget area:

```
{{ symedit_widget_area_render('footer') }}
```

In your widget area templates you should use:

```
{% for widget in widgets %}
    {{ symedit_widget_render(widget) }}
{% endfor %}
```

This is a passthrough for the fragment renderer so if you turn on ESI then you can cache the rest of your page except for the widgets.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~30 days

Recently: every ~93 days

Total

20

Last Release

3844d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1325995?v=4)[Craig Blanchette](/maintainers/isometriks)[@isometriks](https://github.com/isometriks)

---

Top Contributors

[![isometriks](https://avatars.githubusercontent.com/u/1325995?v=4)](https://github.com/isometriks "isometriks (82 commits)")

### Embed Badge

![Health badge](/badges/symedit-widget-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/symedit-widget-bundle/health.svg)](https://phpackages.com/packages/symedit-widget-bundle)
```

###  Alternatives

[mustache/mustache

A Mustache implementation in PHP.

3.3k44.6M291](/packages/mustache-mustache)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[whitecube/nova-flexible-content

Flexible Content &amp; Repeater Fields for Laravel Nova.

8053.0M25](/packages/whitecube-nova-flexible-content)[mopa/bootstrap-bundle

Easy integration of twitters bootstrap into symfony2

7042.9M33](/packages/mopa-bootstrap-bundle)[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3871.2M](/packages/limenius-react-bundle)[nicmart/string-template

StringTemplate is a very simple string template engine for php. I've written it to have a thing like sprintf, but with named and nested substutions.

2101.7M30](/packages/nicmart-string-template)

PHPackages © 2026

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