[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.
|
* Creates a new choice list.
|
||||||
*
|
*
|
||||||
* @param array|\Traversable $choices The array of choices. Choices may also be given
|
* @param array|\Traversable $choices The array of choices. Choices may also be given
|
||||||
* as hierarchy of unlimited depth. Hierarchies are
|
* as hierarchy of unlimited depth. Hierarchies are
|
||||||
* created by creating nested arrays. The title of
|
* created by creating nested arrays. The title of
|
||||||
* the sub-hierarchy can be stored in the array
|
* the sub-hierarchy can be stored in the array
|
||||||
* key pointing to the nested array.
|
* key pointing to the nested array.
|
||||||
* @param array $labels The array of labels. The structure of this 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
|
* @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())
|
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 $labels The labels corresponding to the choices.
|
||||||
* @param array $preferredChoices The preferred choices.
|
* @param array $preferredChoices The preferred choices.
|
||||||
*
|
*
|
||||||
* @throws UnexpectedTypeException If the structure of the $labels array
|
* @throws InvalidConfigurationException If no valid value or index could be created for a choice.
|
||||||
* does not match the structure of the
|
|
||||||
* $choices array.
|
|
||||||
*/
|
*/
|
||||||
protected function addChoices(&$bucketForPreferred, &$bucketForRemaining, array $choices, array $labels, array $preferredChoices)
|
protected function addChoices(&$bucketForPreferred, &$bucketForRemaining, array $choices, array $labels, array $preferredChoices)
|
||||||
{
|
{
|
||||||
@ -280,13 +278,15 @@ class ChoiceList implements ChoiceListInterface
|
|||||||
* Recursively adds a choice group.
|
* Recursively adds a choice group.
|
||||||
*
|
*
|
||||||
* @param string $group The name of the 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.
|
* view objects.
|
||||||
* @param array $bucketForRemaining The bucket where to store the
|
* @param array $bucketForRemaining The bucket where to store the
|
||||||
* non-preferred view objects.
|
* non-preferred view objects.
|
||||||
* @param array $choices The list of choices in the group.
|
* @param array $choices The list of choices in the group.
|
||||||
* @param array $labels The labels corresponding to the choices in the group.
|
* @param array $labels The labels corresponding to the choices in the group.
|
||||||
* @param array $preferredChoices The preferred choices.
|
* @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)
|
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.
|
* Creates a new object choice list.
|
||||||
*
|
*
|
||||||
* @param array $choices The array of choices. Choices may also be given
|
* @param array|\Traversable $choices The array of choices. Choices may also be given
|
||||||
* as hierarchy of unlimited depth. Hierarchies are
|
* as hierarchy of unlimited depth. Hierarchies are
|
||||||
* created by creating nested arrays. The title of
|
* created by creating nested arrays. The title of
|
||||||
* the sub-hierarchy can be stored in the array
|
* the sub-hierarchy can be stored in the array
|
||||||
* key pointing to the nested array.
|
* key pointing to the nested array.
|
||||||
* @param string $labelPath A property path pointing to the property used
|
* @param string $labelPath A property path pointing to the property used
|
||||||
* for the choice labels. The value is obtained
|
* for the choice labels. The value is obtained
|
||||||
* by calling the getter on the object. If the
|
* by calling the getter on the object. If the
|
||||||
|
@ -35,13 +35,13 @@ class SimpleChoiceList extends ChoiceList
|
|||||||
* Creates a new simple choice list.
|
* Creates a new simple choice list.
|
||||||
*
|
*
|
||||||
* @param array $choices The array of choices with the choices as keys and
|
* @param array $choices The array of choices with the choices as keys and
|
||||||
* the labels as values. Choices may also be given
|
* the labels as values. Choices may also be given
|
||||||
* as hierarchy of unlimited depth. Hierarchies are
|
* as hierarchy of unlimited depth. Hierarchies are
|
||||||
* created by creating nested arrays. The title of
|
* created by creating nested arrays. The title of
|
||||||
* the sub-hierarchy is stored in the array
|
* the sub-hierarchy is stored in the array
|
||||||
* key pointing to the nested array.
|
* key pointing to the nested array.
|
||||||
* @param array $preferredChoices A flat array of choices that should be
|
* @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())
|
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
|
* Takes care of splitting the single $choices array passed in the
|
||||||
* constructor into choices and labels.
|
* 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)
|
protected function addChoices(&$bucketForPreferred, &$bucketForRemaining, array $choices, array $labels, array $preferredChoices)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user