Browse Source

Merge pull request #8618 from vchenin/docs

documentation corrections [skip ci]
tags/2.0.6
Qiang Xue 9 years ago
parent
commit
1c4f95ada5
  1. 2
      README.md
  2. 6
      docs/guide/input-file-upload.md
  3. 10
      docs/guide/structure-applications.md

2
README.md

@ -70,7 +70,7 @@ we suggest using [our logo](http://www.yiiframework.com/logo/) on your title sli
**In projects**
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)

6
docs/guide/input-file-upload.md

@ -28,7 +28,7 @@ class UploadForm extends Model
public function rules()
{
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()
{
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']]) ?>
<?= $form->field($model, 'imageFiles')->fileInput(['multiple' => true]) ?>
<?= $form->field($model, 'imageFiles[]')->fileInput(['multiple' => true, 'accept' => 'image/*']) ?>
<button>Submit</button>

10
docs/guide/structure-applications.md

@ -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:
- an application component ID as specified via [components](#components).
- a module ID as specified via [modules](#modules).
- a class name.
- a configuration array.
- an application component ID as specified via [components](#components),
- a module ID as specified via [modules](#modules),
- a class name,
- a configuration array,
- an anonymous function that creates and returns a component.
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).
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.

Loading…
Cancel
Save