diff --git a/apps/advanced/composer.json b/apps/advanced/composer.json index 1400f69..f47f438 100644 --- a/apps/advanced/composer.json +++ b/apps/advanced/composer.json @@ -16,8 +16,9 @@ "require": { "php": ">=5.4.0", "yiisoft/yii2": "dev-master", + "yiisoft/yii2-bootstrap": "dev-master", "yiisoft/yii2-debug": "dev-master", - "yiisoft/yii2-gii": "dev-master" + "yiisoft/yii2-gii": "dev-master", }, "scripts": { "post-create-project-cmd": [ diff --git a/apps/basic/composer.json b/apps/basic/composer.json index 6ff18b1..3144aa8 100644 --- a/apps/basic/composer.json +++ b/apps/basic/composer.json @@ -16,6 +16,7 @@ "require": { "php": ">=5.4.0", "yiisoft/yii2": "dev-master", + "yiisoft/yii2-bootstrap": "dev-master", "yiisoft/yii2-debug": "dev-master", "yiisoft/yii2-gii": "dev-master" }, diff --git a/framework/yii/bootstrap/Alert.php b/extensions/bootstrap/Alert.php similarity index 100% rename from framework/yii/bootstrap/Alert.php rename to extensions/bootstrap/Alert.php diff --git a/framework/yii/bootstrap/BootstrapAsset.php b/extensions/bootstrap/BootstrapAsset.php similarity index 100% rename from framework/yii/bootstrap/BootstrapAsset.php rename to extensions/bootstrap/BootstrapAsset.php diff --git a/framework/yii/bootstrap/BootstrapPluginAsset.php b/extensions/bootstrap/BootstrapPluginAsset.php similarity index 100% rename from framework/yii/bootstrap/BootstrapPluginAsset.php rename to extensions/bootstrap/BootstrapPluginAsset.php diff --git a/framework/yii/bootstrap/BootstrapThemeAsset.php b/extensions/bootstrap/BootstrapThemeAsset.php similarity index 100% rename from framework/yii/bootstrap/BootstrapThemeAsset.php rename to extensions/bootstrap/BootstrapThemeAsset.php diff --git a/framework/yii/bootstrap/Button.php b/extensions/bootstrap/Button.php similarity index 100% rename from framework/yii/bootstrap/Button.php rename to extensions/bootstrap/Button.php diff --git a/framework/yii/bootstrap/ButtonDropdown.php b/extensions/bootstrap/ButtonDropdown.php similarity index 100% rename from framework/yii/bootstrap/ButtonDropdown.php rename to extensions/bootstrap/ButtonDropdown.php diff --git a/framework/yii/bootstrap/ButtonGroup.php b/extensions/bootstrap/ButtonGroup.php similarity index 100% rename from framework/yii/bootstrap/ButtonGroup.php rename to extensions/bootstrap/ButtonGroup.php diff --git a/framework/yii/bootstrap/Carousel.php b/extensions/bootstrap/Carousel.php similarity index 100% rename from framework/yii/bootstrap/Carousel.php rename to extensions/bootstrap/Carousel.php diff --git a/framework/yii/bootstrap/Collapse.php b/extensions/bootstrap/Collapse.php similarity index 100% rename from framework/yii/bootstrap/Collapse.php rename to extensions/bootstrap/Collapse.php diff --git a/framework/yii/bootstrap/Dropdown.php b/extensions/bootstrap/Dropdown.php similarity index 100% rename from framework/yii/bootstrap/Dropdown.php rename to extensions/bootstrap/Dropdown.php diff --git a/framework/yii/bootstrap/Modal.php b/extensions/bootstrap/Modal.php similarity index 100% rename from framework/yii/bootstrap/Modal.php rename to extensions/bootstrap/Modal.php diff --git a/framework/yii/bootstrap/Nav.php b/extensions/bootstrap/Nav.php similarity index 100% rename from framework/yii/bootstrap/Nav.php rename to extensions/bootstrap/Nav.php diff --git a/framework/yii/bootstrap/NavBar.php b/extensions/bootstrap/NavBar.php similarity index 100% rename from framework/yii/bootstrap/NavBar.php rename to extensions/bootstrap/NavBar.php diff --git a/framework/yii/bootstrap/Progress.php b/extensions/bootstrap/Progress.php similarity index 100% rename from framework/yii/bootstrap/Progress.php rename to extensions/bootstrap/Progress.php diff --git a/extensions/bootstrap/README.md b/extensions/bootstrap/README.md new file mode 100644 index 0000000..365f48f --- /dev/null +++ b/extensions/bootstrap/README.md @@ -0,0 +1,32 @@ +Twitter Bootstrap Extension for Yii 2 +===================================== + +This is the Twitter Bootstrap extension for Yii 2. It encapsulates Bootstrap components +and plugins in terms of Yii widgets, and thus makes using Bootstrap components/plugins +in Yii applications extremely easy. For example, the following +single line of code in a view file would render a Bootstrap Progress plugin: + +```php + 60, 'label' => 'test']) ?> +``` + + +Installation +------------ + +The preferred way to install this extension is [composer](http://getcomposer.org/download/). + +Either run + +``` +php composer.phar require yiisoft/yii2-bootstrap "*" +``` + +or add + +``` +"yiisoft/yii2-bootstrap": "*" +``` + +to the require section of your `composer.json` file. + diff --git a/framework/yii/bootstrap/Tabs.php b/extensions/bootstrap/Tabs.php similarity index 100% rename from framework/yii/bootstrap/Tabs.php rename to extensions/bootstrap/Tabs.php diff --git a/framework/yii/bootstrap/Widget.php b/extensions/bootstrap/Widget.php similarity index 100% rename from framework/yii/bootstrap/Widget.php rename to extensions/bootstrap/Widget.php diff --git a/framework/yii/bootstrap/assets/css/bootstrap-theme.css b/extensions/bootstrap/assets/css/bootstrap-theme.css similarity index 100% rename from framework/yii/bootstrap/assets/css/bootstrap-theme.css rename to extensions/bootstrap/assets/css/bootstrap-theme.css diff --git a/framework/yii/bootstrap/assets/css/bootstrap.css b/extensions/bootstrap/assets/css/bootstrap.css similarity index 100% rename from framework/yii/bootstrap/assets/css/bootstrap.css rename to extensions/bootstrap/assets/css/bootstrap.css diff --git a/framework/yii/bootstrap/assets/fonts/glyphicons-halflings-regular.eot b/extensions/bootstrap/assets/fonts/glyphicons-halflings-regular.eot similarity index 100% rename from framework/yii/bootstrap/assets/fonts/glyphicons-halflings-regular.eot rename to extensions/bootstrap/assets/fonts/glyphicons-halflings-regular.eot diff --git a/framework/yii/bootstrap/assets/fonts/glyphicons-halflings-regular.svg b/extensions/bootstrap/assets/fonts/glyphicons-halflings-regular.svg similarity index 100% rename from framework/yii/bootstrap/assets/fonts/glyphicons-halflings-regular.svg rename to extensions/bootstrap/assets/fonts/glyphicons-halflings-regular.svg diff --git a/framework/yii/bootstrap/assets/fonts/glyphicons-halflings-regular.ttf b/extensions/bootstrap/assets/fonts/glyphicons-halflings-regular.ttf similarity index 100% rename from framework/yii/bootstrap/assets/fonts/glyphicons-halflings-regular.ttf rename to extensions/bootstrap/assets/fonts/glyphicons-halflings-regular.ttf diff --git a/framework/yii/bootstrap/assets/fonts/glyphicons-halflings-regular.woff b/extensions/bootstrap/assets/fonts/glyphicons-halflings-regular.woff similarity index 100% rename from framework/yii/bootstrap/assets/fonts/glyphicons-halflings-regular.woff rename to extensions/bootstrap/assets/fonts/glyphicons-halflings-regular.woff diff --git a/framework/yii/bootstrap/assets/js/bootstrap.js b/extensions/bootstrap/assets/js/bootstrap.js similarity index 100% rename from framework/yii/bootstrap/assets/js/bootstrap.js rename to extensions/bootstrap/assets/js/bootstrap.js diff --git a/extensions/bootstrap/composer.json b/extensions/bootstrap/composer.json new file mode 100644 index 0000000..2d75482 --- /dev/null +++ b/extensions/bootstrap/composer.json @@ -0,0 +1,22 @@ +{ + "name": "yiisoft/yii2-bootstrap", + "description": "The Twitter Bootstrap extension for the Yii framework", + "keywords": ["yii", "bootstrap"], + "type": "yii2-extension", + "license": "BSD-3-Clause", + "support": { + "issues": "https://github.com/yiisoft/yii2/issues?state=open", + "forum": "http://www.yiiframework.com/forum/", + "wiki": "http://www.yiiframework.com/wiki/", + "irc": "irc://irc.freenode.net/yii", + "source": "https://github.com/yiisoft/yii2" + }, + "minimum-stability": "dev", + "require": { + "yiisoft/yii2": "*" + }, + "autoload": { + "psr-0": { "yii\\bootstrap\\": "" } + }, + "target-dir": "yii/bootstrap" +} diff --git a/extensions/gii/composer.json b/extensions/gii/composer.json index 5aa1348..fc74a7e 100644 --- a/extensions/gii/composer.json +++ b/extensions/gii/composer.json @@ -13,7 +13,8 @@ }, "minimum-stability": "dev", "require": { - "yiisoft/yii2": "*" + "yiisoft/yii2": "*", + "yiisoft/yii2-bootstrap": "*" }, "autoload": { "psr-0": { "yii\\gii\\": "" } diff --git a/extensions/jui/composer.json b/extensions/jui/composer.json index 0888ab1..ce362d0 100644 --- a/extensions/jui/composer.json +++ b/extensions/jui/composer.json @@ -13,7 +13,8 @@ }, "minimum-stability": "dev", "require": { - "yiisoft/yii2": "*" + "yiisoft/yii2": "*", + "yiisoft/yii2-bootstrap": "*" }, "autoload": { "psr-0": { "yii\\jui\\": "" }