site/site-endpoints

Provides a middleware for registering Slim PHP applications within TYPO3 Frontend Sites

Installs: 5

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Forks: 0

Type:typo3-cms-extension

0.1.3 2022-01-04 03:11 UTC

This package is auto-updated.

Last update: 2024-04-25 11:12:07 UTC


README

Fork of https://github.com/b13/slimphp-bridge

Endpoints allows you to easily create/map an URI pathname to a custom controller of yours. You decide if you need the ExtbaseBridge (which initialize Extbase as TSFE) as custom Middlewares as well.

Endpoints is a way to register easily, rapid, and without complex configurations URI pathnames to controllers.

  • Configure the routes inside your site-configuration (/config/sites/<identifier>/config.yaml) and map it/them to a specific custom controller, method and flush caches
  • Perform a request to the configured route(s)

If you would like to register custom entrypoints for third-party-extensions using the PHP-/YAML-API, you may head over to the README provided from the site/site-endpointsexample package!

Requirements

  • PHP +8.0
  • TYPO3 +11.3

Note that it has not been tested yet on any lower TYPO3/PHP version.

Features

  • Dynamically map an URI pathname towards a TYPO3 controller and action which gets resolved automatically
  • Rapidly API integration
  • Third-party-extension can register custom routes so both options exists to register them; site-configuration and the EndpointsProvider

Planned features

  • Ship custom JavaScript file/function which makes it easier to perform XHRs (XMLHttpRequests)

Configuration

  1. Edit the /config/sites/<identifier>/config.yaml file and add a routes-configuration as here
  2. Edit the controllers/actions to your own setup (or leave it as it - for test purpose)
  3. Flush all caches
  4. Open the /api/v1/article or /api/v1/test to ensure the configured URI pathnames are working.

Thanks 💛

To the b13/slimphp-bridge package which has been used as a base/inspiration to develop this extension!