From 4941db1eee3a9686bb6c5c52d6f5224df1854e95 Mon Sep 17 00:00:00 2001 From: Andrea Panattoni Date: Thu, 21 Nov 2013 22:37:03 +0100 Subject: [PATCH] Checkboxlist documentation fix "Item" parameter keys are the values of the checkbox list, while the values are the checkbox labels. --- framework/yii/helpers/BaseHtml.php | 4 ++-- framework/yii/widgets/ActiveField.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/yii/helpers/BaseHtml.php b/framework/yii/helpers/BaseHtml.php index 64b070b..eb29670 100644 --- a/framework/yii/helpers/BaseHtml.php +++ b/framework/yii/helpers/BaseHtml.php @@ -727,7 +727,7 @@ class BaseHtml * @param string $name the name attribute of each checkbox. * @param string|array $selection the selected value(s). * @param array $items the data item used to generate the checkboxes. - * The array keys are the labels, while the array values are the corresponding checkbox values. + * The array values are the labels, while the array keys are the corresponding checkbox values. * @param array $options options (name => config) for the checkbox list container tag. * The following options are specially handled: * @@ -1253,7 +1253,7 @@ class BaseHtml * @param string $attribute the attribute name or expression. See [[getAttributeName()]] for the format * about attribute expression. * @param array $items the data item used to generate the checkboxes. - * The array keys are the labels, while the array values are the corresponding checkbox values. + * The array values are the labels, while the array keys are the corresponding checkbox values. * Note that the labels will NOT be HTML-encoded, while the values will. * @param array $options options (name => config) for the checkbox list. The following options are specially handled: * diff --git a/framework/yii/widgets/ActiveField.php b/framework/yii/widgets/ActiveField.php index dc97cbd..0320516 100644 --- a/framework/yii/widgets/ActiveField.php +++ b/framework/yii/widgets/ActiveField.php @@ -503,7 +503,7 @@ class ActiveField extends Component * As a result, the corresponding submitted value is an array. * The selection of the checkbox list is taken from the value of the model attribute. * @param array $items the data item used to generate the checkboxes. - * The array keys are the labels, while the array values are the corresponding checkbox values. + * The array values are the labels, while the array keys are the corresponding checkbox values. * Note that the labels will NOT be HTML-encoded, while the values will. * @param array $options options (name => config) for the checkbox list. The following options are specially handled: *