PHPackages                             crisu83/yiistrap - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. crisu83/yiistrap

ActiveLibrary[Framework](/categories/framework)

crisu83/yiistrap
================

Twitter Bootstrap for the Yii PHP framework.

2.0.4(8y ago)286173.3k↓35.5%173[10 issues](https://github.com/Crisu83/yiistrap/issues)19BSD-3-ClausePHP

Since May 12Pushed 8y ago53 watchersCompare

[ Source](https://github.com/Crisu83/yiistrap)[ Packagist](https://packagist.org/packages/crisu83/yiistrap)[ RSS](/packages/crisu83-yiistrap/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (5)Versions (30)Used By (19)

Yiistrap
========

[](#yiistrap)

[![Build Status](https://camo.githubusercontent.com/460e651fe0e3b3bfecba8f57c357a4202984856009bf514b32650823edc73fcd/68747470733a2f2f7472617669732d63692e6f72672f637269737538332f79696973747261702e7376673f6272616e63683d627333)](https://travis-ci.org/crisu83/yiistrap)

Twitter Bootstrap for Yii.

NOTE!
-----

[](#note)

We have re-arranged the repository for this project to make it easier for people to choose the right version. Please make sure you do the following changes if they apply to you:

- If you are using the old `bs3` branch you should switch to use the `2.0.0` tag (or `2.0.x-dev` alias).
- If you are using the old `master` branch you should switch to use the `1.x` branch.

Installation
------------

[](#installation)

### With Composer

[](#with-composer)

The easiest way to install Yiistrap is to use Composer. Add the following to your composer.json file:

```
"require": {
	"crisu83/yiistrap": "2.0.x-dev"
}
```

Run the following command to download the extension:

```
php composer.phar update
```

Add the following to your application configuration:

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

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

```

```

### Without Composer

[](#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
-----

[](#usage)

Documentation not updated yet, but use the current docs as a guideline:

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:***

```
