From d285c6e1dcda18a2fc20a247919a70b4b1762b12 Mon Sep 17 00:00:00 2001 From: Vadym Chenin Date: Mon, 1 Jun 2015 10:41:53 +0300 Subject: [PATCH 1/2] documentation corrections [skip ci] --- README.md | 2 +- docs/guide/input-file-upload.md | 2 +- docs/guide/structure-applications.md | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 49fe334028..ca4e5bd4df 100644 --- a/README.md +++ b/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) diff --git a/docs/guide/input-file-upload.md b/docs/guide/input-file-upload.md index 4662d61232..73b0960d78 100644 --- a/docs/guide/input-file-upload.md +++ b/docs/guide/input-file-upload.md @@ -166,7 +166,7 @@ use yii\widgets\ActiveForm; ['enctype' => 'multipart/form-data']]) ?> - field($model, 'imageFiles')->fileInput(['multiple' => true]) ?> + field($model, 'imageFiles[]')->fileInput(['multiple' => true, 'accept' => 'image/*']) ?> diff --git a/docs/guide/structure-applications.md b/docs/guide/structure-applications.md index 58d07d9a90..38d4d2d5a4 100644 --- a/docs/guide/structure-applications.md +++ b/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. From 99e3505c9d592684f8d2c03fe0c7e14e9cdd45a8 Mon Sep 17 00:00:00 2001 From: Vadym Chenin Date: Mon, 1 Jun 2015 10:49:43 +0300 Subject: [PATCH 2/2] docs/guide/input-file-upload.md change "fileExtension" to "extensions" --- docs/guide/input-file-upload.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guide/input-file-upload.md b/docs/guide/input-file-upload.md index 73b0960d78..1d59af8389 100644 --- a/docs/guide/input-file-upload.md +++ b/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], ]; }