Skip to content
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.

BDX-Digital-Agency/wn-redirectconditions-plugin

 
 

Repository files navigation

Bdx.RedirectConditions

This plugin allows developers to create their own Redirect conditions.

What is a Redirect Condition?

When a positive match occurs in the redirect engine, all registered redirect conditions will be checked if they pass. If one of the conditions does not pass the redirect will not take place.

A redirect condition must implement RedirectConditionInterface.

Each redirect condition must have:

  • getCode() - A unique code.
  • getDescription() - A short description.
  • getExplanation() - A brief explanation on when or how to use it.
  • getFormConfig() - A form configuration array.
  • passes(RedirectRule $rule, string $requestUri) - Logic whether the condition passes with the given $rule and $requestUri.

Requirements

  • The Bdx.Redirect plugin.
  • PHP 7.4 or higher.
  • October CMS 2.1 or higher.

Example

This plugin contains an detailed implementation example (plugin). This plugin can be found at GitHub.

About

Allows developers to create their own Redirect Conditions extension plugins for Winter CMS

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%