Download the PHP package t3g/usercentrics without Composer

On this page you can find all versions of the php package t3g/usercentrics. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package usercentrics

Usercentrics Integration for TYPO3

This extension integrates Usercentrics (Compliance and Consent Management) into TYPO3.

CI

Compatibility

Extension TYPO3 PHP
13.x 13.4 LTS, 14 >= 8.2
12.x 11.5, 12.4 >= 7.4
10.x 10.4 >= 7.2

Starting with version 13.0.0 the extension is configured through site sets and site settings instead of TypoScript. See the migration notes below.

Installation and Configuration

  1. Install the extension from the TER or via composer:

  2. On every site where you want to use the extension, include the site set t3g/usercentrics, either in the backend under Site Management > Sites or in the site's config.yaml:

  3. Configure your Usercentrics ID and the scripts to be handled by Usercentrics in the site settings, either in the backend under Site Management > Sites > [your site] > Settings or in settings.yaml:

Note that the configured data processing service names need to match your Usercentrics configuration.

You do not need to set the type or data-usercentrics attributes for the script tags, the extension will handle that for you.

Usage in Fluid

The extension comes with a custom ViewHelper which can be used to add scripts via Fluid. The namespace usercentrics is registered globally:

The identifier is the AssetCollector identifier. Using the same identifier twice injects the script only once.

Integrate Usercentrics with PHP

To add scripts managed by Usercentrics via PHP, replace your previous calls to the PageRenderer with AssetCollector calls and make sure to set the attributes type=text/plain and data-usercentrics=<data processing service>.

Example:

Migrating from 12.x to 13.x

The TypoScript static template has been replaced by a site set. TypoScript configuration under plugin.tx_usercentrics is no longer read.

  1. Remove the static template Usercentrics Integration from your TypoScript templates.
  2. Include the site set t3g/usercentrics for every site that uses the extension.
  3. Move your plugin.tx_usercentrics TypoScript into the site settings. The structure is the same, except that the numbered TypoScript keys (10, 20, …) become YAML list entries.

Before (TypoScript):

After (settings.yaml):

Development

A DDEV environment is included. It declares the container only, the installation itself is not part of this repository:

Two things about that command: the admin password has to satisfy TYPO3's policy, so it needs an upper case character, a digit and a special character, and the whole thing has to stay on one line, because ddev exec joins its arguments before handing them to the shell in the container.

The ddev restart is needed once: DDEV decides whether to write config/system/additional.php by looking for an installed TYPO3, and that check runs before the dependencies exist on a fresh clone. That file is generated and stays out of the repository, like everything else below config/.

To look at the extension rendering, point the site at the demo set shipped in Build/usercentrics_demo. It is a development-only extension providing the page TypoScript and a Fluid template that uses the ViewHelper, and it is never released, because Build/ is export-ignored.

  1. In config/sites/main/config.yaml, replace the dependencies: { } that --create-site wrote with:

  2. Delete config/sites/main/setup.typoscript. --create-site writes a welcome page into it, and site TypoScript is applied after the site sets, so it would override the demo rendering.

  3. Configure the extension in config/sites/main/settings.yaml, as documented further up, and run ddev exec typo3 cache:flush.

The page then registers scripts both ways the extension offers: two through the site settings and three through the ViewHelper. View the page source and check that each one carries type="text/plain" and a data-usercentrics attribute.

URL What it shows
https://ext-usercentrics.ddev.site/ Demo page, English
https://ext-usercentrics.ddev.site/de/ Same page in German, once a second language is configured, to check the current language
https://ext-usercentrics.ddev.site/typo3 Backend

Tests and checks

The functional suite does not use the demo environment above. It builds its own instance, writes its own site configuration and renders through it.

The functional suite needs a database. Inside DDEV it uses the MariaDB container via the credentials in .ddev/config.yaml; CI runs it on SQLite by setting typo3DatabaseDriver=pdo_sqlite.

Switching the TYPO3 version

The dump-autoload is required: switching majors in place leaves a class alias loader generated for the other one, and PHP then fails before the autoloader runs.


All versions of usercentrics with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2
ext-json Version *
typo3/cms-core Version ^10.4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package t3g/usercentrics contains the following files

Loading the files please wait ...