定制 marcovtwout/yiistrap 二次开发

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

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

marcovtwout/yiistrap

最新稳定版本:2.0.9

Composer 安装命令:

composer require marcovtwout/yiistrap

包简介

Twitter Bootstrap for the Yii PHP framework.

README 文档

README

Twitter Bootstrap for Yii.

Installation

With Composer

The easiest way to install Yiistrap is to use Composer. This is assuming your Yii project is already using Composer and the autoloader.

Run the following command to require and install the extension:

composer require marcovtwout/yiistrap ~2.0@dev

Add the following to your application configuration:

..... 'components' => array( ..... 'bootstrap' => array( 'class' => '\TbApi', ), ), ..... 'modules' => array( ..... 'gii' => array( 'class' => 'system.gii.GiiModule', 'generatorPaths' => array('vendor.marcovtwout.yiistrap.gii'), ), ), .....

Add the following line to your main layout in protected/views/layouts/main.php to register the necessary CSS and JavaScript files:

<?php Yii::app()->bootstrap->register(); ?>

Without Composer

Follow the above steps first, but download and unzip Yiistrap instead of requiring it through Composer.

Then you also need to add the following to your application configuration:

'aliases' => array( 'yiistrap' => __DIR__ . '/relative/path/to/yiistrap', ), ..... 'import' => array( ..... 'yiistrap.behaviors.*', 'yiistrap.components.*', 'yiistrap.form.*', 'yiistrap.helpers.*', 'yiistrap.widgets.*', ), .....

Usage

Documentation not updated yet, but use the current docs as a guideline: http://www.getyiistrap.com

Use the following command to generate ApiGen documentation:

php vendor\bin\apigen generate 

Note: When you use a widget, prepend a \ to the filename to use autoload it through Composer:

<?php $this->widget('\TbNav', array( 'type' => TbHtml::NAV_TYPE_TABS, 'items' => array( array('label' => 'Home', 'url' => '#', 'active' => true), array('label' => 'Profile', 'url' => '#',), array('label' => 'Messages', 'url' => '#',), ), )); ?>

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固