locomotivemtl/charcoal-contrib-redirect

A charcoal admin service that provides redirection.

0.1.1 2022-05-11 21:24 UTC

This package is auto-updated.

Last update: 2024-12-12 03:17:59 UTC


README

License Latest Stable Version Build Status Php version Tabulator version

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)

system menu

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

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:

Coding style validation / enforcement can be performed with composer phpcs. An auto-fixer is also available with composer phpcbf.

Credits

License

Charcoal is licensed under the MIT license. See LICENSE for details.