public function changeData(FormEvent $event)
    {
        $data = $event->getData();

        if (null === $data) {
            $data = array();
        }

        if ($data instanceof \Doctrine\Common\Collections\Collection) {
            $event->setData($data->getValues());
        } else {
            $event->setData(array_values($data));
        }
    }
public function changeData(FormEvent $event)
    {
        $data = $event->getData();

        if (null === $data) {
            $data = array();
        }

        if ($data instanceof \Doctrine\Common\Collections\Collection) {
            $event->setData($data->getValues());
        } else {
            $event->setData(array_values($data));
        }
    }
public function changeData ( FormEvent $ event ) { $ data = $ event -> getData ( ) ; if ( null === $ data ) { $ data = array ( ) ; } if ( $ data instanceof \ Doctrine \ Common \ Collections \ Collection ) { $ event -> setData ( $ data -> getValues ( ) ) ; } else { $ event -> setData ( array_values ( $ data ) ) ; } }
Change data.

@param FormEvent $event
Change data .