horat1us/yii2-chain-bootstrap

Yii2 Bootstrap Chaining

2.0.1 2020-08-14 13:27 UTC

This package is auto-updated.

Last update: 2024-11-16 04:27:46 UTC


README

Build Status codecov

This package provides yii2 bootstrap interface implementation that allows chaining few bootstraps into one. It may be useful when package includes few bootstraps.

Previously it was included into horat1us/yii2-base package as BootstrapGroup.

Installation

Using packagist.org:

composer require horat1us/yii2-chain-bootstrap:^2.0

Usage

Append package Bootstrap to your application configuration

<?php
// config.php

use Horat1us\Yii\Chain;

return [
    'bootstrap' => [
        'package' => [
            'class' => Chain\Bootstrap::class,
            'chain' => [
                BootstrapFirst::class,
                BootstrapSecond::class,
            ],
        ],
    ],
    // ... another application configuration
];

Or implement separate class

<?php
// config.php

namespace Package;

use Horat1us\Yii\Chain;

class Bootstrap extends Chain\Bootstrap {
    public array $chain = [
        Package\Submodule\Bootstrap::class,
    ];
}

License

MIT