PHPackages                             mattdanger/volt-helpers - 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. mattdanger/volt-helpers

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

mattdanger/volt-helpers
=======================

Useful additions to the Volt template engine

v1.0(10y ago)024.3k↓54.8%MITPHPPHP &gt;=5.4.0

Since Apr 13Pushed 10y ago1 watchersCompare

[ Source](https://github.com/mattdanger/volt-helpers)[ Packagist](https://packagist.org/packages/mattdanger/volt-helpers)[ Docs](https://github.com/mattdanger/volt-helpers)[ RSS](/packages/mattdanger-volt-helpers/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

VoltHelpers\\Helpers
====================

[](#volthelpershelpers)

Useful additions to the Volt template engine

Installing
----------

[](#installing)

Install using Composer:

```
{
	"require": {
		"mattdanger/volt-helpers": "dev-master"
	}
}
```

You'll also need to add each function to the Volt service:

```
$di->set('view', function () use ($config) {

  $view = new View();
  // ...
  $view->registerEngines(array(
    '.volt' => function ($view, $di) use ($config) {

      $volt = new VoltEngine($view, $di);

      $volt->getCompiler()->addFunction('ordinal', function ($resolvedArgs, $expArgs) {
        return 'VoltHelpers\Helpers::ordinal(' . $resolvedArgs . ')';
      });
      $volt->getCompiler()->addFunction('strToCurrency', function ($resolvedArgs, $expArgs) {
        return 'VoltHelpers\Helpers::strToCurrency(' . $resolvedArgs . ')';
      });
      $volt->getCompiler()->addFunction('pluralize', function ($resolvedArgs, $expArgs) {
        return 'VoltHelpers\Helpers::pluralize(' . $resolvedArgs . ')';
      });
      $volt->getCompiler()->addFunction('paginationPath', function ($resolvedArgs, $expArgs) {
        return 'VoltHelpers\Helpers::paginationPath(' . $resolvedArgs . ')';
      });
      // ...

      return $volt;
    },
    // ...
  ));

  return $view;

});
```

Using Helpers
-------------

[](#using-helpers)

Here's a list of what's included:

`ordinal($number)`

Number ordinal service - returns 1st, 2nd, 10th, 43rd, 724th, etc.

`strToCurrency($value)`

Output a string in currency format

`pluralize($count, $singular, $plural)`

Pluralize string

`paginationPath()`

Returns a URL encoded string with current request params plus a param for current pagination page number.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3687d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/609890?v=4)[Matt West](/maintainers/mattdanger)[@mattdanger](https://github.com/mattdanger)

---

Top Contributors

[![mattdanger](https://avatars.githubusercontent.com/u/609890?v=4)](https://github.com/mattdanger "mattdanger (6 commits)")

---

Tags

voltphalcon

### Embed Badge

![Health badge](/badges/mattdanger-volt-helpers/health.svg)

```
[![Health](https://phpackages.com/badges/mattdanger-volt-helpers/health.svg)](https://phpackages.com/packages/mattdanger-volt-helpers)
```

###  Alternatives

[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)[symfony/ux-icons

Renders local and remote SVG icons in your Twig templates.

555.8M69](/packages/symfony-ux-icons)[nystudio107/craft-twigpack

Twigpack is a bridge between Twig and webpack, with manifest.json &amp; webpack-dev-server HMR support

97341.4k17](/packages/nystudio107-craft-twigpack)

PHPackages © 2026

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