Fixed ModelType
This commit is contained in:
parent
b4e60ebc92
commit
0fbe363de6
|
@ -30,25 +30,21 @@ class ModelChoiceList extends ArrayChoiceList
|
|||
* @var array
|
||||
*/
|
||||
private $identifier = array();
|
||||
|
||||
/**
|
||||
* A cache for \ReflectionProperty instances for the underlying class
|
||||
* TableMap
|
||||
*
|
||||
* This property should only be accessed through getReflProperty().
|
||||
*
|
||||
* @var array
|
||||
* @var \TableMap
|
||||
*/
|
||||
private $reflProperties = array();
|
||||
private $table = null;
|
||||
/**
|
||||
* Property path
|
||||
*
|
||||
* @var \Symfony\Component\Form\Util\PropertyPath
|
||||
*/
|
||||
private $propertyPath = null;
|
||||
|
||||
private $propertyPath;
|
||||
|
||||
private $relationMap;
|
||||
|
||||
private $table;
|
||||
|
||||
public function __construct(\RelationMap $relationMap, $class, $property = null, $queryBuilder = null, $choices = array())
|
||||
public function __construct($class, $property = null, $choices = array())
|
||||
{
|
||||
$this->relationMap = $relationMap;
|
||||
$this->class = $class;
|
||||
|
||||
$queryClass = $this->class . 'Query';
|
||||
|
|
|
@ -28,7 +28,6 @@ class ModelType extends AbstractType
|
|||
'template' => 'choice',
|
||||
'multiple' => false,
|
||||
'expanded' => false,
|
||||
'relation_map' => null,
|
||||
'class' => null,
|
||||
'property' => null,
|
||||
'choices' => array(),
|
||||
|
@ -41,7 +40,6 @@ class ModelType extends AbstractType
|
|||
|
||||
if (!isset($options['choice_list'])) {
|
||||
$defaultOptions['choice_list'] = new ModelChoiceList(
|
||||
$options['relation_map'],
|
||||
$options['class'],
|
||||
$options['property'],
|
||||
$options['choices']
|
||||
|
|
Loading…
Reference in a new issue