PHPackages                             tollwerk/tw-base - 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. tollwerk/tw-base

ActiveTypo3-cms-extension[Templating &amp; Views](/categories/templating)

tollwerk/tw-base
================

Collection of building blocks and view helpers for TYPO3 projects made by tollwerk

v4.7.1(4y ago)15.2k[2 issues](https://github.com/tollwerk/TYPO3-ext-tw_base/issues)1GPL-2.0+PHP

Since Dec 22Pushed 4y ago1 watchersCompare

[ Source](https://github.com/tollwerk/TYPO3-ext-tw_base)[ Packagist](https://packagist.org/packages/tollwerk/tw-base)[ Docs](https://github.com/tollwerk/TYPO3-ext-tw_base)[ RSS](/packages/tollwerk-tw-base/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (10)Dependencies (3)Versions (27)Used By (1)

TYPO3 extension: tw\_base
=========================

[](#typo3-extension-tw_base)

> Collection of building blocks and viewhelpers for TYPO3 projects by tollwerk

Domain objects
--------------

[](#domain-objects)

### Models

[](#models)

- Custom `Country` model extending `SJBR\StaticInfoTables\Domain\Model\Country` (when the `static_info_tables` extension is installed)
- `UnsubmittableFormDefinition` extending `TYPO3\CMS\Form\Domain\Model\FormDefinition` (Form Framework). Use for form definitions in combination with a custom hook to prevent advancing beyond the final form step (see class for hook example)

### Repositories

[](#repositories)

- Custom `CountryRepository` providing the method `findByIntlPhoneNumber()` to find all countries using a country code starting with particular digits. Extends `SJBR\StaticInfoTables\Domain\Repository\CountryRepository` when the `static_info_tables` extension is installed.

#### Traits

[](#traits)

- `DebuggableRepositoryTrait` — add this to a repository and use the `debugQuery()` method for debugging SQL queries.
- `StoragePidsIgnoringRepositoryTrait` — add this to a repository as a quick and easy way to make it ignore the storage PIDs.

Link handlers
-------------

[](#link-handlers)

- [Telecommunication link handler](Docs/LinkHandler/tel.md) adding support for phone calls etc.

Services
--------

[](#services)

- Custom `ImageService` extending `\TYPO3\CMS\Extbase\Service\ImageService` adding format conversion capabilities
- Image compression services (mozjpeg, SVGO)
- Image converters (WebP)
- Primitive LQIP service, creating SVGO previews of raster images
- Text compression services (gzip, brotli)

These services don't work out of the box and require particular software to be available on the server:

- For optimizing JPEG images using the **mozjpeg encoder**, install the [Mozilla JPEG Encoder Project](https://github.com/mozilla/mozjpeg) and create a `mozjpeg` alias to `jpegtran`.
- For creating WebP image variants, install the [WebP](https://developers.google.com/speed/webp/download) converter on the server and make sure the [cwebp](https://developers.google.com/speed/webp/docs/cwebp) encoder tool is available as `cwebp` on the command line.
- For creating AVIV image variants, install the AVIF converter on the server and make sure the encoder tool is available as `avifenc` on the command line.
- For compressing SVG images on the fly, install the [Node.js](https://nodejs.org/en/) based [SVGO](https://github.com/svg/svgo) tool and make sure it's available as `svgo` on the command line.
- For creating SVG previews for images with Primitive, install the [Go language](https://golang.org/) and [Primitive](https://github.com/fogleman/primitive) on your server and make sure `primitive` is available on the command line.
- For creating gzipped versions of merged CSS and JavaScript files you need to have the [GNU Gzip](https://www.gnu.org/software/gzip/) command line utility installed (standard on any Linux system), globally available as `gzip` binary.
- For creating Brotli compressed versions of merged CSS and JavaScript files you need to have the [Brotli](https://github.com/google/brotli) command line utility installed, globally available as `brotli` binary.

Viewhelpers
-----------

[](#viewhelpers)

- [`cta` viewhelper](Docs/ViewHelpers/cta.md) for rendering CallToAction `` or `` tags
- [`debug` viewhelper](Docs/ViewHelpers/debug.md) for better debugging of live environments
- [`heading` viewhelper](Docs/ViewHelpers/heading.md) for semantic document structuring
- [`render` viewhelper](Docs/ViewHelpers/render.md) for rendering partials &amp; sections with heading context awareness
- [`image` viewhelper](Docs/ViewHelpers/image.md) for rendering compressed images
- [`media` viewhelper](Docs/ViewHelpers/media.md) for responsive images
- [`uniqid` viewhelper](Docs/ViewHelpers/uniqid.md)
- [`page.title` viewhelper](Docs/ViewHelpers/Page/title.md)
- [`structuredData.*` viewhelpers](Docs/ViewHelpers/structured-data.md)
- Viewhelpers for preparing / refining lists of HTML element attributes (empty / non-empty, data attributes, binary attributes)
- `language` viewhelper to translate a 2-character ISO 639-1 language identifier into a readable label (internal languages only)
- Form element viewhelper (returns a [Form Framework](https://docs.typo3.org/typo3cms/extensions/form/) element by its name)
- `form.page.elementsByIdentifier` viewhelper (returns an array of all renderable elements of a form page by their identifier)
- Link info viewhelper (returns detailed information about a link target)
- SVG icon &amp; icon sprite viewhelpers (returns detailed information about a link target)
- `format.age` viewhelper for returning a human readable age string
- `format.leadingZeroes` viewhelper for returning a formatted number string

Utilities
---------

[](#utilities)

- [Array utility](Classes/Utility/ArrayUtility.php) for advanced array operations
- [cURL utility](Classes/Utility/CurlUtility.php) for making HTTP requests
- [Email utility](Classes/Utility/EmailUtility.php) for sending out mixed HTML / plaintext emails
- [TCA utility](Classes/Utility/TcaUtility.php) for easier TCA configuration and manipulation
- [Localization utility](Classes/Utility/LocalizationUtility.php) for enhanced localization with fallback to given translation key

Title Providers
---------------

[](#title-providers)

- `FlexPageTitleProvider` for altering the default title of a page.
- `SeoPageTitleProvider` for applying a dedicated page title for the `` element only.

See the [title provider documentation](Docs/title-providers.md) for details.

Validators
----------

[](#validators)

- [Unique object validator](Classes/Domain/Validator/UniqueObjectValidator.php) for testing whether a unique value is already taken (e.g. for use with the Form Framework)

TCA field evaluations
---------------------

[](#tca-field-evaluations)

- [NumberEvaluation](Classes/Evaluation/NumberEvaluation.php) for numbers with any number of decimals positions. Removes any non-numeric character and converts `,` to `.`

Console Commands
----------------

[](#console-commands)

- `cleanup:processedfiles` for truncating the table of processed files and deleting the corresponding files from the file system
- `cleanup:convertedfiles` for deleting the file variants generated by the image converters (WebP)
- `cleanup:nbsp` for replacing non-breaking spaces with regular spaces in RTE fields
- [update:slugs](Docs/Commands/updateSlugsCommand.md) for updating slugs for given tablenames and fieldnames.

Content Elements
----------------

[](#content-elements)

- Custom video content element with multiple sources, poster image and subtitles / captions

AjaxController
--------------

[](#ajaxcontroller)

A ready-to-use controller and plugin for handling AJAX requests via `?type=4000`. See [AjaxController::dispatchAction()](Classes/Controller/AjaxController.php#L134) for documentation.

Miscellaneous
-------------

[](#miscellaneous)

- Image lazyloading with automatic SVG based preview images (like [SQIP](https://github.com/technopagan/sqip); requires particular software on the server)
- Fluid Standalone template renderer
- Email notification tool (HTML emails &amp; plaintext)
- Helper traits for repositories (for debugging SQL queries and for generally ignoring storage PIDs)

To-do
-----

[](#to-do)

- Test inline images in emails
- Install simplexml for wyrihaximus/html-compress

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 79.8% 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 ~45 days

Recently: every ~71 days

Total

25

Last Release

1638d ago

Major Versions

v1.0.0 → v2.0.02018-12-22

v2.4.0 → v3.0.02019-09-29

v3.2.0 → v4.0.02020-03-27

### Community

Maintainers

![](https://www.gravatar.com/avatar/9654aeebce6e58572ec7ee6e8b30a2f8f41a54a3c7a9580d1df090996f5cfdbb?d=identicon)[jkphl](/maintainers/jkphl)

![](https://www.gravatar.com/avatar/147c7e1ff5f27772359ea86b23c0656cb564077040d7d3de39ec63acd40bf972?d=identicon)[kftw](/maintainers/kftw)

---

Top Contributors

[![jkphl](https://avatars.githubusercontent.com/u/4446936?v=4)](https://github.com/jkphl "jkphl (237 commits)")[![kftw](https://avatars.githubusercontent.com/u/8362710?v=4)](https://github.com/kftw "kftw (60 commits)")

---

Tags

extbasetypo3pictureWebpMozJPEGviewhelperfluid

### Embed Badge

![Health badge](/badges/tollwerk-tw-base/health.svg)

```
[![Health](https://phpackages.com/badges/tollwerk-tw-base/health.svg)](https://phpackages.com/packages/tollwerk-tw-base)
```

###  Alternatives

[fluidtypo3/vhs

This is a collection of ViewHelpers for performing rendering tasks that are not natively provided by TYPO3's Fluid templating engine.

1954.2M59](/packages/fluidtypo3-vhs)[sitegeist/fluid-components

Encapsulated frontend components with Fluid's ViewHelper syntax

55354.1k3](/packages/sitegeist-fluid-components)[sitegeist/fluid-styleguide

Living styleguide for Fluid Components

16237.2k1](/packages/sitegeist-fluid-styleguide)[derhansen/sf_event_mgt

Event management and registration - Configurable event management and registration extension based on ExtBase and Fluid

65329.4k9](/packages/derhansen-sf-event-mgt)[wazum/sluggi

TYPO3 extension for URL slug management with inline editing, auto-sync, locking, access control, and redirects

41515.2k](/packages/wazum-sluggi)[andersundsehr/storybook

The one and only Storybook Renderer for TYPO3 Fluid Components

202.9k](/packages/andersundsehr-storybook)

PHPackages © 2026

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