yii2-extensions/asset-bootbox

为 Yii 框架的 Asset BootBox。

dev-main 2023-11-19 14:40 UTC

This package is auto-updated.

Last update: 2024-09-19 16:31:00 UTC


README

Bootbox 的 Asset。


php-version PHPUnit PHPUnit Codecov Infection

asset-bootbox

安装

安装此扩展的首选方式是通过 composer

运行以下命令之一:

composer require --dev --prefer-dist yii2-extensions/asset-bootbox

或者将以下内容添加到您的 composer.json 文件的 require-dev 部分:

"yii2-extensions/asset-bootbox": "dev-main"

to the require-dev section of your composer.json file.

使用方法

<?php

declare(strict_types=1);

use Yii2\Asset\BootboxAsset;
use yii\helpers\Html;

BootboxAsset::register($this);

echo Html::a(
    'Delete',
    '#',
    [
        'class' => 'btn btn-danger',
        'data' => [
            'confirm' => 'Are you sure you want to delete this item?',
            'method' => 'post',
        ],
    ]
);

优质代码

static-analysis phpstan-level style-ci

支持 Yii2 版本

Yii20 Yii22

测试

查看测试文档了解有关测试的信息。

我们的社交媒体

Twitter

许可证

MIT 许可证。有关更多信息,请参阅许可证文件