A Charcoal service provider to handle route redirections from the admin
interface.
The preferred (and only supported) method is with Composer:
$ composer require locomotivemtl/charcoal-contrib-redirect
- PSR-11: Common interface for dependency containers. Fulfilled by Pimple.
The following services are provided with the use of _ charcoal-contrib-redirect_
- redirection instance
of
\Charcoal\Redirect\Service\Redirection
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": {}
}
}
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.
To install the development environment:
$ composer install
To run the scripts (phplint, phpcs, and phpunit):
$ composer test
- 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/
- [php-coveralls/php-coveralls][phpcov]
- [phpunit/phpunit][phpunit]
- [squizlabs/php_codesniffer][phpcs]
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
.
Charcoal is licensed under the MIT license. See LICENSE for details.