[Form] fixed phpdoc of ChoiceList
This commit is contained in:
parent
c7bc4791c4
commit
8da33eb5bc
@ -66,14 +66,14 @@ class ChoiceList implements ChoiceListInterface
|
||||
* Creates a new choice list.
|
||||
*
|
||||
* @param array|\Traversable $choices The array of choices. Choices may also be given
|
||||
* as hierarchy of unlimited depth. Hierarchies are
|
||||
* created by creating nested arrays. The title of
|
||||
* the sub-hierarchy can be stored in the array
|
||||
* key pointing to the nested array.
|
||||
* as hierarchy of unlimited depth. Hierarchies are
|
||||
* created by creating nested arrays. The title of
|
||||
* the sub-hierarchy can be stored in the array
|
||||
* key pointing to the nested array.
|
||||
* @param array $labels The array of labels. The structure of this array
|
||||
* should match the structure of $choices.
|
||||
* should match the structure of $choices.
|
||||
* @param array $preferredChoices A flat array of choices that should be
|
||||
* presented to the user with priority.
|
||||
* presented to the user with priority.
|
||||
*/
|
||||
public function __construct($choices, array $labels, array $preferredChoices = array())
|
||||
{
|
||||
@ -244,9 +244,7 @@ class ChoiceList implements ChoiceListInterface
|
||||
* @param array $labels The labels corresponding to the choices.
|
||||
* @param array $preferredChoices The preferred choices.
|
||||
*
|
||||
* @throws UnexpectedTypeException If the structure of the $labels array
|
||||
* does not match the structure of the
|
||||
* $choices array.
|
||||
* @throws InvalidConfigurationException If no valid value or index could be created for a choice.
|
||||
*/
|
||||
protected function addChoices(&$bucketForPreferred, &$bucketForRemaining, array $choices, array $labels, array $preferredChoices)
|
||||
{
|
||||
@ -280,13 +278,15 @@ class ChoiceList implements ChoiceListInterface
|
||||
* Recursively adds a choice group.
|
||||
*
|
||||
* @param string $group The name of the group.
|
||||
* @param array $bucketForPreferred The bucket where to store the preferred
|
||||
* @param array $bucketForPreferred The bucket where to store the preferred
|
||||
* view objects.
|
||||
* @param array $bucketForRemaining The bucket where to store the
|
||||
* non-preferred view objects.
|
||||
* @param array $choices The list of choices in the group.
|
||||
* @param array $labels The labels corresponding to the choices in the group.
|
||||
* @param array $preferredChoices The preferred choices.
|
||||
*
|
||||
* @throws InvalidConfigurationException If no valid value or index could be created for a choice.
|
||||
*/
|
||||
protected function addChoiceGroup($group, &$bucketForPreferred, &$bucketForRemaining, array $choices, array $labels, array $preferredChoices)
|
||||
{
|
||||
|
@ -57,11 +57,11 @@ class ObjectChoiceList extends ChoiceList
|
||||
/**
|
||||
* Creates a new object choice list.
|
||||
*
|
||||
* @param array $choices The array of choices. Choices may also be given
|
||||
* as hierarchy of unlimited depth. Hierarchies are
|
||||
* created by creating nested arrays. The title of
|
||||
* the sub-hierarchy can be stored in the array
|
||||
* key pointing to the nested array.
|
||||
* @param array|\Traversable $choices The array of choices. Choices may also be given
|
||||
* as hierarchy of unlimited depth. Hierarchies are
|
||||
* created by creating nested arrays. The title of
|
||||
* the sub-hierarchy can be stored in the array
|
||||
* key pointing to the nested array.
|
||||
* @param string $labelPath A property path pointing to the property used
|
||||
* for the choice labels. The value is obtained
|
||||
* by calling the getter on the object. If the
|
||||
|
@ -35,13 +35,13 @@ class SimpleChoiceList extends ChoiceList
|
||||
* Creates a new simple choice list.
|
||||
*
|
||||
* @param array $choices The array of choices with the choices as keys and
|
||||
* the labels as values. Choices may also be given
|
||||
* as hierarchy of unlimited depth. Hierarchies are
|
||||
* created by creating nested arrays. The title of
|
||||
* the sub-hierarchy is stored in the array
|
||||
* key pointing to the nested array.
|
||||
* the labels as values. Choices may also be given
|
||||
* as hierarchy of unlimited depth. Hierarchies are
|
||||
* created by creating nested arrays. The title of
|
||||
* the sub-hierarchy is stored in the array
|
||||
* key pointing to the nested array.
|
||||
* @param array $preferredChoices A flat array of choices that should be
|
||||
* presented to the user with priority.
|
||||
* presented to the user with priority.
|
||||
*/
|
||||
public function __construct(array $choices, array $preferredChoices = array())
|
||||
{
|
||||
@ -74,20 +74,10 @@ class SimpleChoiceList extends ChoiceList
|
||||
}
|
||||
|
||||
/**
|
||||
* Recursively adds the given choices to the list.
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* Takes care of splitting the single $choices array passed in the
|
||||
* constructor into choices and labels.
|
||||
*
|
||||
* @param array $bucketForPreferred
|
||||
* @param array $bucketForRemaining
|
||||
* @param array $choices
|
||||
* @param array $labels
|
||||
* @param array $preferredChoices
|
||||
*
|
||||
* @throws UnexpectedTypeException
|
||||
*
|
||||
* @see parent::addChoices
|
||||
*/
|
||||
protected function addChoices(&$bucketForPreferred, &$bucketForRemaining, array $choices, array $labels, array $preferredChoices)
|
||||
{
|
||||
|
Reference in New Issue
Block a user