PHPackages                             avblink/avb\_twig - 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. avblink/avb\_twig

ActiveDrupal-module[Templating &amp; Views](/categories/templating)

avblink/avb\_twig
=================

Drupal 8 Twig Extension. Provides custom twig functions and filters.

v1.0.2(6y ago)01.1kPHP

Since Apr 28Pushed 6y ago1 watchersCompare

[ Source](https://github.com/avblink/avb_twig)[ Packagist](https://packagist.org/packages/avblink/avb_twig)[ Docs](https://github.com/avblink/avb_twig)[ RSS](/packages/avblink-avb-twig/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)Dependencies (1)Versions (4)Used By (0)

Drupal Twig Extension by AVB Link
=================================

[](#drupal-twig-extension-by-avb-link)

Contains Drupal Twig functions and filters.

- Get current entity from path.

```
{% set node = avb_twig_current_entity('node') %}
```

- Assign new Attribute() class to a variable

```
{% set attributes = avb_twig_create_attribute(['class', ['class1', 'class2']]) %}
{{ avb_twig_create_attribute().addClass(['class1', 'class2'])}}
```

- Add '*style*' attribute

```
{% set attributes = avb_twig_create_attribute().addStyle({'background-color': 'red'}) %}
```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

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 ~563 days

Total

3

Last Release

2224d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/14271824?v=4)[Alexander Benjamin](/maintainers/avblink)[@avblink](https://github.com/avblink)

---

Top Contributors

[![avblink](https://avatars.githubusercontent.com/u/14271824?v=4)](https://github.com/avblink "avblink (7 commits)")

---

Tags

twigdrupalextension

### Embed Badge

![Health badge](/badges/avblink-avb-twig/health.svg)

```
[![Health](https://phpackages.com/badges/avblink-avb-twig/health.svg)](https://phpackages.com/packages/avblink-avb-twig)
```

###  Alternatives

[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.3k10](/packages/helsingborg-stad-municipio)[pattern-lab/drupal-twig-components

A collection of Twig components to be used with Drupal- and Twig-related StarterKits.

17853.4k2](/packages/pattern-lab-drupal-twig-components)[redant/twig-components

Define reusable components in Twig.

3819.9k1](/packages/redant-twig-components)[pressbooks/pressbooks-book

This theme is named after Canadian media theorist Marshall McLuhan, who coined the phrase “the medium is the message.” It is designed for academic writing and is also suitable for fiction. Headings are set in Cormorant Garamond, and body type is set in Lora.

206.7k](/packages/pressbooks-pressbooks-book)

PHPackages © 2026

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