Merge pull request #12368 from w3lifer/patch-16

Cosmetic changes 3
This commit is contained in:
Dmitry Naumenko
2016-08-28 20:45:59 +03:00
committed by GitHub

View File

@@ -396,7 +396,7 @@ class ActiveField extends Component
* to validate a hidden input, you should not need to use this method. Instead, you should * to validate a hidden input, you should not need to use this method. Instead, you should
* use [[\yii\helpers\Html::activeHiddenInput()]]. * use [[\yii\helpers\Html::activeHiddenInput()]].
* *
* This method will generate the "name" and "value" tag attributes automatically for the model attribute * This method will generate the `name` and `value` tag attributes automatically for the model attribute
* unless they are explicitly specified in `$options`. * unless they are explicitly specified in `$options`.
* @param array $options the tag options in terms of name-value pairs. These will be rendered as * @param array $options the tag options in terms of name-value pairs. These will be rendered as
* the attributes of the resulting tag. The values will be HTML-encoded using [[Html::encode()]]. * the attributes of the resulting tag. The values will be HTML-encoded using [[Html::encode()]].
@@ -528,26 +528,26 @@ class ActiveField extends Component
/** /**
* Renders a checkbox. * Renders a checkbox.
* This method will generate the "checked" tag attribute according to the model attribute value. * This method will generate the `checked` tag attribute according to the model attribute value.
* @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:
* *
* - uncheck: string, the value associated with the uncheck state of the radio button. If not set, * - `uncheck`: string, the value associated with the uncheck state of the radio button. If not set,
* it will take the default value '0'. This method will render a hidden input so that if the radio button * it will take the default value `0`. This method will render a hidden input so that if the radio button
* is not checked and is submitted, the value of this attribute will still be submitted to the server * is not checked and is submitted, the value of this attribute will still be submitted to the server
* via the hidden input. If you do not want any hidden input, you should explicitly set this option as null. * via the hidden input. If you do not want any hidden input, you should explicitly set this option as `null`.
* - label: string, a label displayed next to the checkbox. It will NOT be HTML-encoded. Therefore you can pass * - `label`: string, a label displayed next to the checkbox. It will NOT be HTML-encoded. Therefore you can pass
* in HTML code such as an image tag. If this is coming from end users, you should [[Html::encode()|encode]] it to prevent XSS attacks. * in HTML code such as an image tag. If this is coming from end users, you should [[Html::encode()|encode]] it to prevent XSS attacks.
* When this option is specified, the checkbox will be enclosed by a label tag. If you do not want any label, you should * When this option is specified, the checkbox will be enclosed by a label tag. If you do not want any label, you should
* explicitly set this option as null. * explicitly set this option as `null`.
* - labelOptions: array, the HTML attributes for the label tag. This is only used when the "label" option is specified. * - `labelOptions`: array, the HTML attributes for the label tag. This is only used when the `label` option is specified.
* *
* The rest of the options will be rendered as the attributes of the resulting tag. The values will * The rest of the options will be rendered as the attributes of the resulting tag. The values will
* be HTML-encoded using [[Html::encode()]]. If a value is null, the corresponding attribute will not be rendered. * be HTML-encoded using [[Html::encode()]]. If a value is `null`, the corresponding attribute will not be rendered.
* *
* If you set a custom `id` for the input element, you may need to adjust the [[$selectors]] accordingly. * If you set a custom `id` for the input element, you may need to adjust the [[$selectors]] accordingly.
* *
* @param boolean $enclosedByLabel whether to enclose the checkbox within the label. * @param boolean $enclosedByLabel whether to enclose the checkbox within the label.
* If true, the method will still use [[template]] to layout the checkbox and the error message * If `true`, the method will still use [[template]] to layout the checkbox and the error message
* except that the checkbox is enclosed by the label tag. * except that the checkbox is enclosed by the label tag.
* @return $this the field object itself. * @return $this the field object itself.
*/ */