项目作者: afbora

项目描述 :
Kirby plugins loader from multiple roots
高级语言: PHP
项目地址: git://github.com/afbora/kirby-loader.git
创建时间: 2019-07-29T17:25:33Z
项目社区:https://github.com/afbora/kirby-loader

开源协议:MIT License

下载


Kirby Loader

The Kirby Loader allows you to install plugins from multiple root directories. You can easily manage plug-ins by grouping them.

Installation

Installation with composer

  1. composer require afbora/kirby-loader

Add as git submodule

  1. git submodule add https://github.com/afbora/kirby-loader.git site/plugins/kirby-loader

Usage

  1. <?php
  2. return [
  3. 'afbora.loader.roots' => [
  4. // register string paths
  5. '/plugins/core',
  6. '/plugins/payment',
  7. '/plugins/shipping',
  8. // register single directory
  9. '/theme',
  10. // register with callback
  11. function () {
  12. return option('custom.option.path');
  13. },
  14. ]
  15. ];

Options

The default values of the package are:

Option Default Values Description
afbora.loader.roots [] (array) Array with the roots

All the values can be updated in the config.php file.