Download the PHP package netresearch/contexts without Composer

On this page you can find all versions of the php package netresearch/contexts. 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 contexts

Multi-channel Contexts for TYPO3

Content visibility control for TYPO3 based on configurable contexts

CI Codecov Documentation OpenSSF Scorecard OpenSSF Best Practices PHPStan PHP 8.2-8.5 TYPO3 v13 | v14 Latest Release SLSA 3


Show and hide pages and content elements based on configurable "contexts". With the use of contexts, TYPO3 is able to do multichannel output.

Requirements

Version TYPO3 PHP
5.x 13.4, 14.3 8.2 - 8.5
4.x 12.4, 13.4 8.2 - 8.5
3.x 11.5 7.4 - 8.1

Context Examples

With companion extensions:

Apart from the context rules, this extension also provides an API to use contexts in your own extensions.

Table of Contents

Setup

  1. Install and activate extension contexts
  2. Clear TYPO3 cache

Optional Extensions:

Creating and Using Contexts

Creating a Context

  1. Log into the TYPO3 backend as administrator
  2. Go to Web/List view, root page (ID 0)
  3. Create a new record: TYPO3 contexts → Context
  4. Configure:
    • Title: e.g., "Affiliate ID: foo"
    • Type: "GET parameter"
    • Parameter name: affID
    • Parameter value: foo
    • Enable "Store result in user session"
  5. Save and close

Using a Context

  1. Go to Web/Page, select a page
  2. Edit a content element
  3. Select the "Contexts" tab
  4. For your context, select "Visible: yes"
  5. Save

The content element is now only visible when the context matches.

Context Types

Domain

Match based on the accessed domain name.

Query Parameter

Match based on URL query parameters.

IP Address

Match the user's IP address. IPv4 and IPv6 supported.

HTTP Header

Match HTTP request headers (User-Agent, Accept-Language, X-Forwarded-For, etc.)

Session Variable

Match based on session data. Checks if a session variable with the given name exists.

Logical Combination

Combine multiple contexts with logical operators:

Operator Description
&& Logical AND
|| Logical OR
! Negation
(...) Grouping

Example: mobile && !tablet

Integration

Fluid Templates

TypoScript Conditions

PHP API

Development

Testing

Code Quality

Tool Version Purpose
PHPUnit 10/11/12/13 Unit and functional tests
PHPStan 2.x Static analysis (level 10)
PHP-CS-Fixer 3.x Code style (PSR-12)

Documentation

Full documentation available at docs.typo3.org.

License

This project is licensed under the AGPL-3.0-or-later.

Credits

Developed and maintained by Netresearch DTT GmbH.

Contributors: Andre Hähnel, Christian Opitz, Christian Weiske, Marian Pollzien, Rico Sonntag, Benni Mack, and others.


All versions of contexts with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-pdo Version *
typo3/cms-backend Version ^13.4 || ^14.3
typo3/cms-core Version ^13.4 || ^14.3
typo3/cms-frontend Version ^13.4 || ^14.3
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 netresearch/contexts contains the following files

Loading the files please wait ...