Instructions

This yii module uses Twitter Bootstrap as a base. It is written for the Yii framework and requires at least PHP> = 5.3 *.The usual widgets like CGridView offered with. You could test it after installation with the gii code generator is included in the module.

× 06.03.2014 Module removed add as Extension Commit
× 02.03.2014 Plz check Documentation BSHtml now BsHtml ,BSApi => BsApi and some more changes are from Commit Thx to Safarov Alisher

Append in Your Yii Layout:

        
<?php
$cs        
Yii::app()->clientScript;
$themePath Yii::app()->theme->baseUrl;

/**
 * StyleSHeets
 */
$cs->registerCssFile($themePath '/assets/css/bootstrap.css');
$cs->registerCssFile($themePath '/assets/css/bootstrap-theme.css');

/**
 * JavaScripts
 */
$cs->registerCoreScript('jquery'CClientScript::POS_END);
$cs->registerCoreScript('jquery.ui'CClientScript::POS_END);
$cs->registerScriptFile($themePath '/assets/js/bootstrap.min.js'CClientScript::POS_END);
$cs->registerScript('tooltip'"$('[data-toggle=\"tooltip\"]').tooltip();$('[data-toggle=\"popover\"]').tooltip()"CClientScript::POS_READY);
?>
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
    <script src="<?php
echo Yii::app()->theme->baseUrl '/assets/js/html5shiv.js';
?>"></script>
    <script src="<?php
echo Yii::app()->theme->baseUrl '/assets/js/respond.min.js';
?>"></script>
<![endif]-->

Module Installation

Download the module move the Package to your

/protected/modules/

or install with Composer

Packagist

"drmabuse/yii-bootstrap-3-module": "dev-master"
  • Set up Git by following the instructions here.
    • Update the configurations in app/config/ to suit your needs. The /config/main.php to suit your database requirements.
    • Composer is required The package includes already a composer.phar file.
    • Browse through the composer.json and remove the dependencies you don't need also update the required versions of the extensions.
    • If you have composer installed globally:
      • Run composer self-update to make sure you have the latest version of composer.
      • Run composer install to download all the dependencies.
    • If you work the composer.phar library within the project boilerplate.
    • Run php composer.phar self-update to make sure you have the latest version of composer.
    • Run php composer.phar install to download all the dependencies.

Configure

configure

/config/main.php

with

    
<?php
array(
    
'aliases' => array(
        
'bootstrap' => 'ext.bootstrap'
    
),
    
'import' => array(
        
        
'bootstrap.behaviors.*',
        
'bootstrap.helpers.*',
        
'bootstrap.widgets.*'
    
),
    
'modules' => array(
        
'gii' => array(
            
'generatorPaths' => array(
                
'bootstrap.gii'
            
)
        )
    ),
    
'components' => array(
        
        
'bootstrap' => array(
            
'class' => 'bootstrap.components.BsApi'
        
)
    )
);
?>

Full Config Example