Deleted useless code in the ModelChoiceList form type
This commit is contained in:
parent
0004c1761c
commit
e8a9e22a18
|
@ -405,19 +405,14 @@ class ModelChoiceList extends ObjectChoiceList
|
||||||
*/
|
*/
|
||||||
private function getIdentifierValues($model)
|
private function getIdentifierValues($model)
|
||||||
{
|
{
|
||||||
if ($model instanceof ActiveRecordInterface) {
|
|
||||||
return array($model->getPrimaryKey());
|
|
||||||
}
|
|
||||||
|
|
||||||
// readonly="true" models do not implement ActiveRecordInterface.
|
|
||||||
if ($model instanceof ActiveRecordInterface && method_exists($model, 'getPrimaryKey')) {
|
|
||||||
return array($model->getPrimaryKey());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (null === $model) {
|
if (null === $model) {
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($model instanceof ActiveRecordInterface) {
|
||||||
|
return array($model->getPrimaryKey());
|
||||||
|
}
|
||||||
|
|
||||||
return $model->getPrimaryKeys();
|
return $model->getPrimaryKeys();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue