PHPackages                             marcovtwout/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. marcovtwout/yiistrap

ActiveLibrary[Framework](/categories/framework)

marcovtwout/yiistrap
====================

Twitter Bootstrap for the Yii PHP framework.

2.0.9(3y ago)014.5k↑56.3%BSD-3-ClausePHP

Since May 12Pushed 3y ago1 watchersCompare

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

READMEChangelogDependencies (5)Versions (32)Used By (0)

Yiistrap
========

[](#yiistrap)

Twitter Bootstrap for Yii.

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

[](#installation)

### With Composer

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

```

```

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

```
