Model/CmsFileManager.php
public function publishDataMediaList($data) {
        $fileManager = $this->getFileManager();
        $em = $this->getDoctrine()->getManager();
        if (count($data)>0 ) {
            foreach($data as $field => $value) {
                if (substr($field, '0', '6') == 'media_') {
                    foreach($this->valueMedia($value) as $idMedia) {
                        $file = $em->getRepository('KitpagesFileBundle:File')->find($idMedia);
                        if ($file != null) {
                            $fileManager->publish($file);
                        }
                    }
                }
            }
        }
    }
public function publishDataMediaList($data) {
        $fileManager = $this->getFileManager();
        $em = $this->getDoctrine()->getManager();
        if (count($data)>0 ) {
            foreach($data as $field => $value) {
                if (substr($field, '0', '6') == 'media_') {
                    foreach($this->valueMedia($value) as $idMedia) {
                        $file = $em->getRepository('KitpagesFileBundle:File')->find($idMedia);
                        if ($file != null) {
                            $fileManager->publish($file);
                        }
                    }
                }
            }
        }
    }
//