PHPackages                             trilobit-gmbh/contao-calculator-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. trilobit-gmbh/contao-calculator-bundle

ActiveContao-bundle[Utility &amp; Helpers](/categories/utility)

trilobit-gmbh/contao-calculator-bundle
======================================

Contao 4 / Contao 5 calculator bundle

3.0.0(4mo ago)31.5k1LGPL-3.0-or-laterPHPPHP ^8.0

Since Oct 15Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/trilobit-gmbh/contao-calculator-bundle)[ Packagist](https://packagist.org/packages/trilobit-gmbh/contao-calculator-bundle)[ RSS](/packages/trilobit-gmbh-contao-calculator-bundle/feed)WikiDiscussions main Synced yesterday

READMEChangelog (8)Dependencies (9)Versions (12)Used By (0)

Calculator Bundle
=================

[](#calculator-bundle)

Das Calculator Bundle ermöglicht es durch Verwendung eines Insert-Tags eine Vielzahl an Operationen durchzuführen. Mögliche Operationen währen arithmetische Operationen, mit denen es möglich ist, einfache bis verschachtelte Berechnungen auszuführen. Durch die Verwendung der Symfony Expression Language ist es außerdem möglich, Variablen zu definieren und diese wiederum für Operationen zu verwenden. Diese Variablen können entweder in einer `config.yml` definiert werden dann muss diese mit dem Array `parameters` anfangen und unter `www/app/config` ihrer Webseite abgelegt werden. Oder sie fügen die Variablen in die `parameters.yml` ihrer Webseite ein, so wie im Beispiel unten.

Aufbau
------

[](#aufbau)

Der Insert-Tag wird durch die Abkürzung "calc" definiert und mit zwei Doppelpunkten von der Operation getrennt. Dies könnte zum Beispiel so aussehen: `{{calc::5 + 7}}`, mit Variablen so: `{{calc::Länge * Breite}}`oder so `{{calc::Rechteck['Länge'] * Rechteck['Breite']}}`.

Mit Datum rechnen
-----------------

[](#mit-datum-rechnen)

Um mit Datum rechnen zu können müssen die Date-InsertTags mit `[`-Klammern geschrieben werden:

Die trilobit GmbH gibt es jetzt seit `{{calc::[[date::Y]] - 1999}}` Jahren.

Die trilobit GmbH ist jetzt `{{calc::(([[date::Y]]*12+[[date::m]])-(1999*12+3)-(([[date::Y]]*12+[[date::m]])-(1999*12+3))%12)/12}}` Jahre und `{{calc::(([[date::Y]]*12+[[date::m]])-(1999*12+3))%12}}` Monate alt.

Verwendung mit Formulardaten
----------------------------

[](#verwendung-mit-formulardaten)

Um mit Formulardaten rechnen zu können die müssen Post-InsertTags mit `[`-Klammern geschrieben werden:

Die trilobit GmbH bekommt jetzt `{{post::spende}}`€ und gibt davon `{{calc::[[post::spende]] / 2}}`€ an die Contao Association weiter.

Calculator bundle
=================

[](#calculator-bundle-1)

The Calculator Bundle allows you to perform a variety of operations by using an insert-tag. Possible operations could be arithmetical operations with which it is possible to do simple to complex calculations. By using the Symfony Expression Language it is also possible to define variables and to use these for operations. These variables can either be defined in a `config.yml` but then they must start with the array `parameters` and be stored in `www/app/config` of your website. Or you add the variables to your `parameters.yml` of your website, as in the example below.

Structure
---------

[](#structure)

The insert tag is defined by the abbreviation "calc" and separated from the operation with two colons. For example, this could look like this: `{{calc::5 + 7}}`, with variables like this: `{{calc::length * width}}`or like this `{{calc::rectangle['length'] * rectangle['width']}}`.

How to use
----------

[](#how-to-use)

Add parameters to your `parameters.yml` or `config.yml`:

```
trilobit:
    calculator:
        vars:
            trilobit: 123
            contao:
                partner:
                    - type: 'Webdesign'
                      test: 42
                      referenzen:
                          - 'du'
                          - 'ich'
                          - 'wir'
                    - type: 'Progammierung'
                      test: 2
                    - type: 'Schulung'
                      test: 3
            github: 'trilobit-gmbh'
```

Insert-TagErgebnis / Ausgabe`{{calc::5+7}}`12`{{calc::5+7*10}}`75`{{calc::trilobit}}`123`{{calc::trilobit*3}}`369`{{calc::contao['partner'][0]['type']}}`Webdesign`{{calc::contao['partner'][0]['test']}}`42`{{calc::contao['partner'][0]['referenzen'][0]}}`du`{{calc::contao['partner'][0]['test'] + trilobit}}`165`{{calc::github}}`trilobit-gmbhInstallation
------------

[](#installation)

Install the extension via composer: [trilobit-gmbh/contao-calculator-bundle](https://packagist.org/packages/trilobit-gmbh/contao-calculator-bundle).

Compatibility
-------------

[](#compatibility)

- Contao version ~4.13
- Contao version ~5.3
- Contao version ~5.7

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance77

Regular maintenance activity

Popularity21

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 96.4% 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 ~269 days

Recently: every ~348 days

Total

11

Last Release

123d ago

Major Versions

1.3.0 → 2.0.02023-01-09

2.0.2 → 3.0.02026-03-02

PHP version history (5 changes)v1.0.0PHP ^7.0

v1.1.0PHP ^7.1

1.3.0PHP ^7.3 || ^8.0

2.0.1PHP ^7.4 || ^8.0

3.0.0PHP ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7868402?v=4)[trilobit-gmbh](/maintainers/trilobit-gmbh)[@trilobit-gmbh](https://github.com/trilobit-gmbh)

---

Top Contributors

[![trilobit-gmbh](https://avatars.githubusercontent.com/u/7868402?v=4)](https://github.com/trilobit-gmbh "trilobit-gmbh (27 commits)")[![katgirl](https://avatars.githubusercontent.com/u/1223243?v=4)](https://github.com/katgirl "katgirl (1 commits)")

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/trilobit-gmbh-contao-calculator-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/trilobit-gmbh-contao-calculator-bundle/health.svg)](https://phpackages.com/packages/trilobit-gmbh-contao-calculator-bundle)
```

###  Alternatives

[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1189.8k](/packages/rcsofttech-audit-trail-bundle)[verbb/formie

The most user-friendly forms plugin for Craft.

102393.6k69](/packages/verbb-formie)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

54681.3k18](/packages/solspace-craft-freeform)[contao-community-alliance/dc-general

Universal data container for Contao

1680.8k92](/packages/contao-community-alliance-dc-general)[contao/manager-bundle

Provides the Contao Managed Edition

181.3M74](/packages/contao-manager-bundle)[typo3/cms-form

TYPO3 CMS Form - Flexible TYPO3 frontend form framework that comes with a backend editor interface.

147.6M265](/packages/typo3-cms-form)

PHPackages © 2026

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