Paul Klimov
11 years ago
455 changed files with 31199 additions and 49398 deletions
@ -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 |
||||
<?= yii\bootstrap\Progress::widget(['percent' => 60, 'label' => 'test']) ?> |
||||
``` |
||||
|
||||
|
||||
Installation |
||||
------------ |
||||
|
||||
The preferred way to install this extension is through [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. |
||||
|
@ -1,44 +1,63 @@
|
||||
Yii 2.0 Public Preview - Composer Installer |
||||
=========================================== |
||||
Yii 2 Composer Installer |
||||
======================== |
||||
|
||||
Thank you for choosing Yii - a high-performance component-based PHP framework. |
||||
This is the composer installer for Yii 2 extensions. It implements a new composer package type named `yii2-extension`, |
||||
which should be used by all Yii 2 extensions if they are distributed as composer packages. |
||||
|
||||
If you are looking for a production-ready PHP framework, please use |
||||
[Yii v1.1](https://github.com/yiisoft/yii). |
||||
|
||||
Yii 2.0 is still under heavy development. We may make significant changes |
||||
without prior notices. **Yii 2.0 is not ready for production use yet.** |
||||
Usage |
||||
----- |
||||
|
||||
[![Build Status](https://secure.travis-ci.org/yiisoft/yii2.png)](http://travis-ci.org/yiisoft/yii2) |
||||
|
||||
This is the yii2 composer installer. |
||||
|
||||
|
||||
Installation |
||||
------------ |
||||
|
||||
This extension offers you enhanced Composer handling for your yii2-project. It will therefore require you to use Composer. |
||||
To use Yii 2 composer installer, simply set `type` to be `yii2-extension` in your `composer.json`, |
||||
like the following: |
||||
|
||||
```json |
||||
{ |
||||
"type": "yii2-extension", |
||||
"require": { |
||||
"yiisoft/yii2": "*" |
||||
}, |
||||
... |
||||
} |
||||
``` |
||||
php composer.phar require yiisoft/yii2-composer "*" |
||||
``` |
||||
|
||||
*Note: You might have to run `php composer.phar selfupdate` before using this extension.* |
||||
|
||||
|
||||
Usage & Documentation |
||||
--------------------- |
||||
|
||||
This extension allows you to hook to certain composer events and automate preparing your Yii2 application for further usage. |
||||
|
||||
After the package is installed, the `composer.json` file has to be modified to enable this extension. |
||||
|
||||
To see it in action take a look at the example apps in the repository: |
||||
|
||||
- [Basic](https://github.com/suralc/yii2/blob/master/apps/basic/composer.json#L27) |
||||
- [Advanced](https://github.com/suralc/yii2/blob/extensions-readme/apps/advanced/composer.json) |
||||
|
||||
However it might be useful to read through the official composer [documentation](http://getcomposer.org/doc/articles/scripts.md) |
||||
to understand what this extension can do for you and what it can't. |
||||
You may specify a bootstrap class in the `extra` section. The `init()` method of the class will be executed each time |
||||
the Yii 2 application is responding to a request. For example, |
||||
|
||||
```json |
||||
{ |
||||
"type": "yii2-extension", |
||||
..., |
||||
"extra": { |
||||
"bootstrap": "yii\\jui\\Extension" |
||||
} |
||||
} |
||||
``` |
||||
|
||||
You can also use this as a template to create your own composer additions to ease development and deployment of your app. |
||||
The `Installer` class also implements a static method `setPermission()` that can be called after |
||||
a Yii 2 projected is installed, through the `post-create-project-cmd` composer script. |
||||
The method will set specified directories or files to be writable or executable, depending on |
||||
the corresponding parameters set in the `extra` section of the `composer.json` file. |
||||
For example, |
||||
|
||||
```json |
||||
{ |
||||
"name": "yiisoft/yii2-app-basic", |
||||
"type": "project", |
||||
... |
||||
"scripts": { |
||||
"post-create-project-cmd": [ |
||||
"yii\\composer\\Installer::setPermission" |
||||
] |
||||
}, |
||||
"extra": { |
||||
"writable": [ |
||||
"runtime", |
||||
"web/assets" |
||||
], |
||||
"executable": [ |
||||
"yii" |
||||
] |
||||
} |
||||
} |
||||
``` |
||||
|
@ -0,0 +1,46 @@
|
||||
Debug Extension for Yii 2 |
||||
========================= |
||||
|
||||
This extension provides a debugger for Yii 2 applications. When this extension is used, |
||||
a debugger toolbar will appear at the bottom of every page. The extension also provides |
||||
a set of standalone pages to display more detailed debug information. |
||||
|
||||
|
||||
Installation |
||||
------------ |
||||
|
||||
The preferred way to install this extension is through [composer](http://getcomposer.org/download/). |
||||
|
||||
Either run |
||||
|
||||
``` |
||||
php composer.phar require yiisoft/yii2-debug "*" |
||||
``` |
||||
|
||||
or add |
||||
|
||||
``` |
||||
"yiisoft/yii2-debug": "*" |
||||
``` |
||||
|
||||
to the require section of your `composer.json` file. |
||||
|
||||
|
||||
Usage |
||||
----- |
||||
|
||||
Once the extension is installed, simply modify your application configuration as follows: |
||||
|
||||
```php |
||||
return [ |
||||
'preload' => ['debug'], |
||||
'modules' => [ |
||||
'debug' => 'yii\debug\Module', |
||||
... |
||||
], |
||||
... |
||||
]; |
||||
``` |
||||
|
||||
You will see a debugger toolbar showing at the bottom of every page of your application. |
||||
You can click on the toolbar to see more detailed debug information. |
@ -0,0 +1,23 @@
|
||||
{ |
||||
"name": "yiisoft/yii2-debug", |
||||
"description": "The debugger extension for the Yii framework", |
||||
"keywords": ["yii", "debug", "debugger"], |
||||
"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": "*", |
||||
"yiisoft/yii2-bootstrap": "*" |
||||
}, |
||||
"autoload": { |
||||
"psr-0": { "yii\\debug\\": "" } |
||||
}, |
||||
"target-dir": "yii/debug" |
||||
} |
@ -1,6 +1,6 @@
|
||||
<?php |
||||
/** |
||||
* @var \yii\base\View $this |
||||
* @var \yii\web\View $this |
||||
* @var \yii\debug\Panel[] $panels |
||||
* @var string $tag |
||||
*/ |
@ -1,6 +1,6 @@
|
||||
<?php |
||||
/** |
||||
* @var \yii\base\View $this |
||||
* @var \yii\web\View $this |
||||
* @var string $content |
||||
*/ |
||||
use yii\helpers\Html; |
@ -0,0 +1,47 @@
|
||||
Gii Extension for Yii 2 |
||||
======================== |
||||
|
||||
This extension provides a Web-based code generator, called Gii, for Yii 2 applications. |
||||
You can use Gii to quickly generate models, forms, modules, CRUD, etc. |
||||
|
||||
|
||||
Installation |
||||
------------ |
||||
|
||||
The preferred way to install this extension is through [composer](http://getcomposer.org/download/). |
||||
|
||||
Either run |
||||
|
||||
``` |
||||
php composer.phar require yiisoft/yii2-gii "*" |
||||
``` |
||||
|
||||
or add |
||||
|
||||
``` |
||||
"yiisoft/yii2-gii": "*" |
||||
``` |
||||
|
||||
to the require section of your `composer.json` file. |
||||
|
||||
|
||||
Usage |
||||
----- |
||||
|
||||
Once the extension is installed, simply modify your application configuration as follows: |
||||
|
||||
```php |
||||
return [ |
||||
'modules' => [ |
||||
'gii' => 'yii\gii\Module', |
||||
... |
||||
], |
||||
... |
||||
]; |
||||
``` |
||||
|
||||
You can then access Gii through the following URL: |
||||
|
||||
``` |
||||
http://localhost/path/to/index.php?r=gii |
||||
``` |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue