PHPackages                             betsol/assets-referencer-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. betsol/assets-referencer-bundle

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

betsol/assets-referencer-bundle
===============================

Assets referencer bundle for Symfony

v1.0.0(11y ago)2366MITPHPPHP &gt;=5.3.3

Since Jul 3Pushed 11y ago1 watchersCompare

[ Source](https://github.com/betsol/AssetsReferencerBundle)[ Packagist](https://packagist.org/packages/betsol/assets-referencer-bundle)[ RSS](/packages/betsol-assets-referencer-bundle/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (2)Used By (0)

AssetsReferencerBundle
======================

[](#assetsreferencerbundle)

Description
-----------

[](#description)

This bundle will provide you with Twig function, that can be used to reference assets, i.e. CSS, JavaScript and image files from inside your templates.

You will be able to change base URL of the assets by a single configuration option.

### Features

[](#features)

- Allows you to define assets in your Twig templates in a consistent way
- Provides you with the ability to change base URL of all your assets in one place

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

[](#installation)

### Install library with Composer

[](#install-library-with-composer)

`composer require betsol/assets-referencer-bundle ~1.0`

### Add bundle to your application's kernel

[](#add-bundle-to-your-applications-kernel)

```
// app/AppKernel.php

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            ...
            new Betsol\Bundle\AssetsReferencerBundle\AssetsReferencerBundle,
        );

        ...
    }
}
```

### Introduce bundle configuration to your config file

[](#introduce-bundle-configuration-to-your-config-file)

```
# app/config/config.yml

assets_referencer:
    base_url: http://static.example.com/
```

Usage
-----

[](#usage)

Use `asset_reference` function in your Twig templates to specify paths for your assets.

```
{# Favicon #}

{# Stylesheet #}

{# JavaScript #}

{# Image #}

```

API
---

[](#api)

See the examples above.

Feedback
--------

[](#feedback)

If you have found a bug or have another issue with the library - please [create an issue](https://github.com/betsol/AssetsReferencerBundle/issues/new)in this GitHub repository.

If you have a question - file it with [StackOverflow](http://stackoverflow.com/questions/ask?tags=php,symfony2) and send a link to [my E-Mail address](mailto:s.fomin@betsol.ru). I will be glad to help.

Have any ideas or propositions? Feel free to [contact me](mailto:s.fomin@betsol.ru).

Cheers!

License
-------

[](#license)

The MIT License (MIT)

Copyright (c) 2014 Better Solutions, Slava Fomin II

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

4328d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f6a73e4f0ce6ff6be2532096f09c444ebe2c4e030e7d1511f665ab7818199b67?d=identicon)[s.fomin](/maintainers/s.fomin)

### Embed Badge

![Health badge](/badges/betsol-assets-referencer-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/betsol-assets-referencer-bundle/health.svg)](https://phpackages.com/packages/betsol-assets-referencer-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)
