Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vdlp/oc-redirectconditions-plugin
Allows developers to create their own Redirect Conditions extension plugins for October CMS
https://github.com/vdlp/oc-redirectconditions-plugin
octobercms octobercms-plugin php plugin redirect-conditions
Last synced: about 4 hours ago
JSON representation
Allows developers to create their own Redirect Conditions extension plugins for October CMS
- Host: GitHub
- URL: https://github.com/vdlp/oc-redirectconditions-plugin
- Owner: vdlp
- License: gpl-2.0
- Created: 2019-03-15T08:11:52.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-03-14T13:49:29.000Z (8 months ago)
- Last Synced: 2024-11-02T04:05:44.016Z (13 days ago)
- Topics: octobercms, octobercms-plugin, php, plugin, redirect-conditions
- Language: PHP
- Homepage:
- Size: 39.1 KB
- Stars: 3
- Watchers: 8
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Vdlp.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 `Vdlp.Redirect` plugin.
- PHP 8.0.2 or higher.
- October CMS 3.0 or higher.## Example
This plugin contains an detailed implementation example (plugin). This plugin can be found at [GitHub](https://github.com/vdlp/oc-redirectconditionsexample-plugin).