private function processAdminBackgroundImage($event)
 {
     $file = $event->getFile();
     $config = $event->getConfig();
     if (!$file instanceof File) {
         throw new \Exception('Not instance of File');
     }
     $fileDir = str_replace($this->container->get('kernel')->getRootDir() . '/../web', "", $config['storage']['directory']);
     $image = new Background();
     $image->setName($file->getFilename());
     $image->setPath($fileDir . "/" . $file->getFilename());
     $em = $this->container->get('doctrine')->getManager();
     $em->persist($image);
     $em->flush();
 }
 /**
  * {@inheritDoc}
  */
 public function setName($name)
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'setName', array($name));
     return parent::setName($name);
 }