Fixed phpdoc

This commit is contained in:
William DURAND 2011-09-28 18:46:28 +03:00
parent 1b00958210
commit bf17655c59

View file

@ -15,6 +15,11 @@ use Symfony\Component\Form\Exception\FormException;
use Symfony\Component\Form\Exception\UnexpectedTypeException;
use Symfony\Component\Form\Extension\Core\ChoiceList\ArrayChoiceList;
/**
* Widely inspirated by the EntityChoiceList (Symfony2).
*
* @author William Durand <william.durand1@gmail.com>
*/
class ModelChoiceList extends ArrayChoiceList
{
/**
@ -29,7 +34,6 @@ class ModelChoiceList extends ArrayChoiceList
* @var Collection
*/
private $models = array();
/**
* The fields of which the identifier of the underlying class consists
*
@ -55,6 +59,12 @@ class ModelChoiceList extends ArrayChoiceList
*/
private $query = null;
/**
* @param string $class
* @param string $property
* @param array $choices
* @param \ModelCriteria $queryObject
*/
public function __construct($class, $property = null, $choices = array(), $queryObject = null)
{
$this->class = $class;
@ -83,10 +93,9 @@ class ModelChoiceList extends ArrayChoiceList
* Otherwise the identifiers are used as indices.
*
* If the models were passed in the "choices" option, this method
* does not have any significant overhead. Otherwise, if a query builder
* was passed in the "query_builder" option, this builder is now used
* to construct a query which is executed. In the last case, all models
* for the underlying class are fetched from the repository.
* does not have any significant overhead. Otherwise, if a query object
* was passed in the "query" option, this query is now used and executed.
* In the last case, all models for the underlying class are fetched.
*
* If the option "property" was passed, the property path in that option
* is used as option values. Otherwise this method tries to convert
@ -194,13 +203,12 @@ class ModelChoiceList extends ArrayChoiceList
/**
* Returns the values of the identifier fields of an model
*
* Doctrine must know about this model, that is, the model must already
* Propel must know about this model, that is, the model must already
* be persisted or added to the idmodel map before. Otherwise an
* exception is thrown.
*
* @param object $model The model for which to get the identifier
* @throws FormException If the model does not exist in Doctrine's
* idmodel map
* @throws FormException If the model does not exist
*/
public function getIdentifierValues($model)
{