PHPackages                             entea/silex-twig-simple-asset-extension - 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. entea/silex-twig-simple-asset-extension

ActiveLibrary[Templating &amp; Views](/categories/templating)

entea/silex-twig-simple-asset-extension
=======================================

Simple twig asset function for Silex

v1.0.1(11y ago)166.1k↑172.7%4MITPHPPHP &gt;=5.3.0

Since Nov 13Pushed 11y ago3 watchersCompare

[ Source](https://github.com/Entea/Silex-Twig-Simple-Asset-Extension)[ Packagist](https://packagist.org/packages/entea/silex-twig-simple-asset-extension)[ Docs](http://github.com/Entea/Silex-Twig-Simple-Asset-Extension)[ RSS](/packages/entea-silex-twig-simple-asset-extension/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (3)Used By (0)

Simple twig extension for Silex, for creating links to assets
-------------------------------------------------------------

[](#simple-twig-extension-for-silex-for-creating-links-to-assets)

### Usage

[](#usage)

```
require_once __DIR__ . '/silex.phar';

$app = new Silex\Application();
$app['debug'] = true;
$app['autoloader']->registerNamespaces(array('Entea'   => __DIR__.'/src'));
$app->register(
    new Silex\Provider\TwigServiceProvider(),
    array(
         'twig.path' => __DIR__ . '/views',
         'twig.class_path' => __DIR__ . '/vendor/twig/lib',
    )
);

/* @var Twig_Environment $twig */
$twig = $app['twig'];
$twig->addExtension(new \Entea\Twig\Extension\AssetExtension($app));

$app->get('/', function() use (&$app)
    {
        return $app['twig']->render('index.html.twig', array());
    });

$app->run();

```

And then, in your twig file:

```
{{asset('/style/hello.css')}}

```

or with a specific version which overrides the global version

```
{{asset('/style/hello.css', '1.2')}}

```

### Properties

[](#properties)

- **asset.directory**: Your asset directory
- **asset.version**: Your asset global version (default: 1.0)

### Installation

[](#installation)

#### Via composer:

[](#via-composer)

```
require: "entea/silex-twig-simple-asset-extension": "dev-master"

```

or

```
require: "entea/silex-twig-simple-asset-extension": "v1.0.1"

```

Or simply **checkout this repo** :)

###  Health Score

34

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 73.3% 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 ~791 days

Total

2

Last Release

4087d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5d422b752f77df931b8dc7d80bce17f2bd0e936105a0fc60648a552ceefeef84?d=identicon)[Entea](/maintainers/Entea)

---

Top Contributors

[![Entea](https://avatars.githubusercontent.com/u/531803?v=4)](https://github.com/Entea "Entea (11 commits)")[![oziks](https://avatars.githubusercontent.com/u/542074?v=4)](https://github.com/oziks "oziks (2 commits)")[![hbu50](https://avatars.githubusercontent.com/u/1133426?v=4)](https://github.com/hbu50 "hbu50 (1 commits)")[![ke20](https://avatars.githubusercontent.com/u/1608482?v=4)](https://github.com/ke20 "ke20 (1 commits)")

---

Tags

twigassetsilex

### Embed Badge

![Health badge](/badges/entea-silex-twig-simple-asset-extension/health.svg)

```
[![Health](https://phpackages.com/badges/entea-silex-twig-simple-asset-extension/health.svg)](https://phpackages.com/packages/entea-silex-twig-simple-asset-extension)
```

###  Alternatives

[teepluss/theme

Theme will help you organize your themes inside Laravel projects easily and maintain its related assets, layouts and partials for the theme in single directory.

543173.3k8](/packages/teepluss-theme)

PHPackages © 2026

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