Symfony\Bridge\Propel1\Form\ChoiceList\ModelChoiceList::__construct
Constructor.
Signature
Parameters
$class
—
string
- The FQCN of the model class to be loaded.
$labelPath
—
string
- A property path pointing to the property used for the choice labels.
$choices
—
array
- An optional array to use, rather than fetching the models.
$queryObject
—
object
- The query to use retrieving model data from database.
$groupPath
—
string
- A property path pointing to the property used to group the choices.
$preferred
—
array
- The preferred items of this choice.
Either an array if $choices is given,
or a ModelCriteria to be merged with the $queryObject.
$propertyAccessor
—
Symfony\Component\PropertyAccess\PropertyAccessorInterface
- The reflection graph for reading property paths.