mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-12 03:30:12 +08:00
Small corrections in docblocks (#12443) [skip ci]
This commit is contained in:
committed by
Alexander Makarov
parent
d5d36a9c40
commit
b668970a80
@@ -58,7 +58,7 @@ class ActiveForm extends Widget
|
|||||||
/**
|
/**
|
||||||
* @var array|\Closure the default configuration used by [[field()]] when creating a new field object.
|
* @var array|\Closure the default configuration used by [[field()]] when creating a new field object.
|
||||||
* This can be either a configuration array or an anonymous function returning a configuration array.
|
* This can be either a configuration array or an anonymous function returning a configuration array.
|
||||||
* If the latter, the signature should be as follows,
|
* If the latter, the signature should be as follows:
|
||||||
*
|
*
|
||||||
* ```php
|
* ```php
|
||||||
* function ($model, $attribute)
|
* function ($model, $attribute)
|
||||||
@@ -184,8 +184,8 @@ class ActiveForm extends Widget
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Runs the widget.
|
* Runs the widget.
|
||||||
* This registers the necessary javascript code and renders the form close tag.
|
* This registers the necessary JavaScript code and renders the form close tag.
|
||||||
* @throws InvalidCallException if `beginField()` and `endField()` calls are not matching
|
* @throws InvalidCallException if `beginField()` and `endField()` calls are not matching.
|
||||||
*/
|
*/
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
@@ -211,7 +211,7 @@ class ActiveForm extends Widget
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the options for the form JS widget.
|
* Returns the options for the form JS widget.
|
||||||
* @return array the options
|
* @return array the options.
|
||||||
*/
|
*/
|
||||||
protected function getClientOptions()
|
protected function getClientOptions()
|
||||||
{
|
{
|
||||||
@@ -247,7 +247,7 @@ class ActiveForm extends Widget
|
|||||||
/**
|
/**
|
||||||
* Generates a summary of the validation errors.
|
* Generates a summary of the validation errors.
|
||||||
* If there is no validation error, an empty error summary markup will still be generated, but it will be hidden.
|
* If there is no validation error, an empty error summary markup will still be generated, but it will be hidden.
|
||||||
* @param Model|Model[] $models the model(s) associated with this form
|
* @param Model|Model[] $models the model(s) associated with this form.
|
||||||
* @param array $options the tag options in terms of name-value pairs. The following options are specially handled:
|
* @param array $options the tag options in terms of name-value pairs. The following options are specially handled:
|
||||||
*
|
*
|
||||||
* - `header`: string, the header HTML for the error summary. If not set, a default prompt string will be used.
|
* - `header`: string, the header HTML for the error summary. If not set, a default prompt string will be used.
|
||||||
@@ -255,7 +255,7 @@ class ActiveForm extends Widget
|
|||||||
*
|
*
|
||||||
* The rest of the options will be rendered as the attributes of the container tag. The values will
|
* The rest of the options will be rendered as the attributes of the container tag. The values will
|
||||||
* be HTML-encoded using [[\yii\helpers\Html::encode()]]. If a value is `null`, the corresponding attribute will not be rendered.
|
* be HTML-encoded using [[\yii\helpers\Html::encode()]]. If a value is `null`, the corresponding attribute will not be rendered.
|
||||||
* @return string the generated error summary
|
* @return string the generated error summary.
|
||||||
* @see errorSummaryCssClass
|
* @see errorSummaryCssClass
|
||||||
*/
|
*/
|
||||||
public function errorSummary($models, $options = [])
|
public function errorSummary($models, $options = [])
|
||||||
@@ -269,12 +269,12 @@ class ActiveForm extends Widget
|
|||||||
* Generates a form field.
|
* Generates a form field.
|
||||||
* A form field is associated with a model and an attribute. It contains a label, an input and an error message
|
* A form field is associated with a model and an attribute. It contains a label, an input and an error message
|
||||||
* and use them to interact with end users to collect their inputs for the attribute.
|
* and use them to interact with end users to collect their inputs for the attribute.
|
||||||
* @param Model $model the data model
|
* @param Model $model the data model.
|
||||||
* @param string $attribute the attribute name or expression. See [[Html::getAttributeName()]] for the format
|
* @param string $attribute the attribute name or expression. See [[Html::getAttributeName()]] for the format
|
||||||
* about attribute expression.
|
* about attribute expression.
|
||||||
* @param array $options the additional configurations for the field object. These are properties of [[ActiveField]]
|
* @param array $options the additional configurations for the field object. These are properties of [[ActiveField]]
|
||||||
* or a subclass, depending on the value of [[fieldClass]].
|
* or a subclass, depending on the value of [[fieldClass]].
|
||||||
* @return ActiveField the created ActiveField object
|
* @return ActiveField the created ActiveField object.
|
||||||
* @see fieldConfig
|
* @see fieldConfig
|
||||||
*/
|
*/
|
||||||
public function field($model, $attribute, $options = [])
|
public function field($model, $attribute, $options = [])
|
||||||
@@ -297,11 +297,11 @@ class ActiveForm extends Widget
|
|||||||
* Begins a form field.
|
* Begins a form field.
|
||||||
* This method will create a new form field and returns its opening tag.
|
* This method will create a new form field and returns its opening tag.
|
||||||
* You should call [[endField()]] afterwards.
|
* You should call [[endField()]] afterwards.
|
||||||
* @param Model $model the data model
|
* @param Model $model the data model.
|
||||||
* @param string $attribute the attribute name or expression. See [[Html::getAttributeName()]] for the format
|
* @param string $attribute the attribute name or expression. See [[Html::getAttributeName()]] for the format
|
||||||
* about attribute expression.
|
* about attribute expression.
|
||||||
* @param array $options the additional configurations for the field object
|
* @param array $options the additional configurations for the field object.
|
||||||
* @return string the opening tag
|
* @return string the opening tag.
|
||||||
* @see endField()
|
* @see endField()
|
||||||
* @see field()
|
* @see field()
|
||||||
*/
|
*/
|
||||||
@@ -315,7 +315,7 @@ class ActiveForm extends Widget
|
|||||||
/**
|
/**
|
||||||
* Ends a form field.
|
* Ends a form field.
|
||||||
* This method will return the closing tag of an active form field started by [[beginField()]].
|
* This method will return the closing tag of an active form field started by [[beginField()]].
|
||||||
* @return string the closing tag of the form field
|
* @return string the closing tag of the form field.
|
||||||
* @throws InvalidCallException if this method is called without a prior [[beginField()]] call.
|
* @throws InvalidCallException if this method is called without a prior [[beginField()]] call.
|
||||||
*/
|
*/
|
||||||
public function endField()
|
public function endField()
|
||||||
@@ -337,7 +337,7 @@ class ActiveForm extends Widget
|
|||||||
*
|
*
|
||||||
* ```php
|
* ```php
|
||||||
* $model = new Post;
|
* $model = new Post;
|
||||||
* $model->load($_POST);
|
* $model->load(Yii::$app->request->post());
|
||||||
* if (Yii::$app->request->isAjax) {
|
* if (Yii::$app->request->isAjax) {
|
||||||
* Yii::$app->response->format = Response::FORMAT_JSON;
|
* Yii::$app->response->format = Response::FORMAT_JSON;
|
||||||
* return ActiveForm::validate($model);
|
* return ActiveForm::validate($model);
|
||||||
@@ -352,7 +352,7 @@ class ActiveForm extends Widget
|
|||||||
* ActiveForm::validate($model1, $model2, ...);
|
* ActiveForm::validate($model1, $model2, ...);
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* @param Model $model the model to be validated
|
* @param Model $model the model to be validated.
|
||||||
* @param mixed $attributes list of attributes that should be validated.
|
* @param mixed $attributes list of attributes that should be validated.
|
||||||
* If this parameter is empty, it means any attribute listed in the applicable
|
* If this parameter is empty, it means any attribute listed in the applicable
|
||||||
* validation rules should be validated.
|
* validation rules should be validated.
|
||||||
|
|||||||
Reference in New Issue
Block a user