mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-20 16:38:22 +08:00
Merge pull request #8618 from vchenin/docs
documentation corrections [skip ci]
This commit is contained in:
@@ -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:
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user