Merge pull request #8618 from vchenin/docs

documentation corrections [skip ci]
This commit is contained in:
Qiang Xue
2015-06-01 09:14:52 -04:00
3 changed files with 9 additions and 9 deletions

View File

@@ -70,7 +70,7 @@ we suggest using [our logo](http://www.yiiframework.com/logo/) on your title sli
**In projects** **In projects**
If you are using Yii 2 as part of an OpenSource project, a way to acknowledge it is to If you are using Yii 2 as part of an OpenSource project, a way to acknowledge it is to
[use a special badge](URL https://img.shields.io/badge/Powered_by-Yii_Framework-green.svg?style=flat) in your README: [use a special badge](https://img.shields.io/badge/Powered_by-Yii_Framework-green.svg?style=flat) in your README:
![Yii2](https://img.shields.io/badge/Powered_by-Yii_Framework-green.svg?style=flat) ![Yii2](https://img.shields.io/badge/Powered_by-Yii_Framework-green.svg?style=flat)

View File

@@ -28,7 +28,7 @@ class UploadForm extends Model
public function rules() public function rules()
{ {
return [ return [
[['imageFile'], 'file', 'skipOnEmpty' => false, 'fileExtension' => 'png, jpg'], [['imageFile'], 'file', 'skipOnEmpty' => false, 'extensions' => 'png, jpg'],
]; ];
} }
@@ -138,7 +138,7 @@ class UploadForm extends Model
public function rules() public function rules()
{ {
return [ return [
[['imageFiles'], 'file', 'skipOnEmpty' => false, 'fileExtension' => 'png, jpg', 'maxFiles' => 4], [['imageFiles'], 'file', 'skipOnEmpty' => false, 'extensions' => 'png, jpg', 'maxFiles' => 4],
]; ];
} }
@@ -166,7 +166,7 @@ use yii\widgets\ActiveForm;
<?php $form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]) ?> <?php $form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]) ?>
<?= $form->field($model, 'imageFiles')->fileInput(['multiple' => true]) ?> <?= $form->field($model, 'imageFiles[]')->fileInput(['multiple' => true, 'accept' => 'image/*']) ?>
<button>Submit</button> <button>Submit</button>

View File

@@ -106,10 +106,10 @@ you may list its ID as an element in this property.
Each component listed in this property may be specified in one of the following formats: Each component listed in this property may be specified in one of the following formats:
- an application component ID as specified via [components](#components). - an application component ID as specified via [components](#components),
- a module ID as specified via [modules](#modules). - a module ID as specified via [modules](#modules),
- a class name. - a class name,
- a configuration array. - a configuration array,
- an anonymous function that creates and returns a component. - an anonymous function that creates and returns a component.
For example: For example:
@@ -215,7 +215,7 @@ Each application component is specified as a key-value pair in the array. The ke
while the value represents the component class name or [configuration](concept-configurations.md). while the value represents the component class name or [configuration](concept-configurations.md).
You can register any component with an application, and the component can later be accessed globally You can register any component with an application, and the component can later be accessed globally
using the expression `\Yii::$app->ComponentID`. using the expression `\Yii::$app->componentID`.
Please read the [Application Components](structure-application-components.md) section for details. Please read the [Application Components](structure-application-components.md) section for details.