public function onVichUploaderPreUpload(Event $event)
    {
        $media = $event->getObject();

        $this->checkIfThereIsAName($media);
        $this->checkIfNameEverExistInDatabase($media);
        $this->checkIfFileLocationIsChanging($media);
    }
public function onVichUploaderPreUpload(Event $event)
    {
        $media = $event->getObject();

        $this->checkIfThereIsAName($media);
        $this->checkIfNameEverExistInDatabase($media);
        $this->checkIfFileLocationIsChanging($media);
    }
public function onVichUploaderPreUpload ( Event $ event ) { $ media = $ event -> getObject ( ) ; $ this -> checkIfThereIsAName ( $ media ) ; $ this -> checkIfNameEverExistInDatabase ( $ media ) ; $ this -> checkIfFileLocationIsChanging ( $ media ) ; }
Check if name exist.
Check if name exist .