locomotivemtl / charcoal-contrib-redirect
A charcoal admin service that provides redirection.
Requires
- php: >7.4
- ext-json: *
- charcoal-admin: >0.30.2
Requires (Dev)
- php-coveralls/php-coveralls: ^2.2
- phpunit/phpunit: ^7.1
- squizlabs/php_codesniffer: ^3.5
This package is auto-updated.
Last update: 2024-11-12 03:09:16 UTC
README
A Charcoal service provider to handle route redirections from the admin
interface.
Table of Contents
Installation
The preferred (and only supported) method is with Composer:
$ composer require locomotivemtl/charcoal-contrib-redirect
Dependencies
Required
PSR
- PSR-11: Common interface for dependency containers. Fulfilled by Pimple.
Service Provider
The following services are provided with the use of _ charcoal-contrib-redirect_
Services
- redirection instance
of
\Charcoal\Redirect\Service\Redirection
Configuration
The only required configuration for the redirect module is to require the module in the list of loaded modules in the app configuration.
{ "modules": { "charcoal/redirect/redirect": {} } }
Usage
When the module is loaded, a new database table (charcoal_contrib_redirect_redirections
) will be created automatically
when needed. This table will be used to store redirections. When in the admin interface, a new item is added to the
system menu dropdown (Url redirections
)
This system menu item requires the user to adhere to the "system/admin"
acl permission.
Development
To install the development environment:
$ composer install
To run the scripts (phplint, phpcs, and phpunit):
$ composer test
API Documentation
- The auto-generated
phpDocumentor
API documentation is available at:
https://locomotivemtl.github.io/charcoal-contrib-redirect/docs/master/ - The auto-generated
apigen
API documentation is available at:
https://codedoc.pub/locomotivemtl/charcoal-contrib-redirect/master/
Development Dependencies
- [php-coveralls/php-coveralls][phpcov]
- [phpunit/phpunit][phpunit]
- [squizlabs/php_codesniffer][phpcs]
Coding Style
The charcoal-contrib-redirect module follows the Charcoal coding-style:
- PSR-1
- PSR-2
- PSR-4, autoloading is therefore provided by Composer.
- phpDocumentor comments.
- phpcs.xml.dist and .editorconfig for coding standards.
Coding style validation / enforcement can be performed with
composer phpcs
. An auto-fixer is also available withcomposer phpcbf
.
Credits
License
Charcoal is licensed under the MIT license. See LICENSE for details.