protected function attached($form)
{
parent::attached($form);
$this->fileEntity = Objects::hasProperty($this->parent->data, $this->name) ? Objects::getProperty($this->parent->data, $this->name) : NULL;
if ($this->fileEntity instanceof \Doctrine\Common\Collections\Collection) {
$this->multi = true;
}
}