定制 odairdelahoz/adminlte4-helper 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

odairdelahoz/adminlte4-helper

Composer 安装命令:

composer require odairdelahoz/adminlte4-helper

包简介

A PHP-8.2 library designed to simplify the generation of AdminLTE 4 HTML components, widgets and layouts.

README 文档

README

A PHP-8.2 library designed to simplify the generation of AdminLTE 4 HTML components, widgets and layouts.

Description

This library provides a set of PHP classes that act as helpers for rendering various UI components from the AdminLTE 4 dashboard template. It aims to streamline the process of building AdminLTE-powered interfaces in PHP applications by offering an object-oriented approach to component creation.

Installation

This library can be installed via Composer. First, ensure you have Composer installed.

  1. Add the repository to your composer.json (if not publishing to Packagist):

    If you are using this library directly from its source or before it's officially on Packagist, you might need to add a repository entry to your project's composer.json:

    {
        "repositories": [
            {
                "type": "path",
                "url": "./path/to/AdminLTE4Helper" // Adjust this path to where you cloned/placed the library
            }
        ],
        "require": {
            "odairdelahoz/adminlte4-helper": "*"
        }
    }
  2. Require the package:

    composer require odairdelahoz/adminlte4-helper

Usage

After installing via Composer, you can use the components by including Composer's autoloader:

<?php
require_once __DIR__ . '/vendor/autoload.php';

use AdminLTE\Components\Card;
use AdminLTE\Components\Alert;
use AdminLTE\Layout;

// Example: Render a Card
echo Card::render('My First Card', 'This is the content of my card.', ['color' => 'primary']);

// Example: Render an Alert
echo Alert::render('Success! Your operation was successful.', ['color' => 'success', 'dismissible' => true]);

// Example: Using the Layout class
$layout = new Layout('My Page Title', ['fixed_header' => true]);
$layout->renderHead();
// ... render other layout parts ...
$layout->renderBodyEnd();
?>

Examples

Explore the examples/ directory within the library for detailed usage demonstrations of each component and layout type. Each file in that directory showcases different options and configurations.

To view the layout examples, you can open examples/layout_preview.php in your browser (after running composer install in the AdminLTE4Helper directory).

License

This project is licensed under the MIT License - see the LICENSE file in the main project repository for details.

统计信息

  • 总下载量: 10
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-09-07