plugin/drop-zone/Manager/DropzoneManager.php
public function switchCorrectionValidation(Correction $correction)
    {
        $this->om->startFlushSuite();

        $correction->setValid(!$correction->isValid());
        $this->om->persist($correction);
        $drop = $this->computeDropScore($correction->getDrop());
        $this->checkSuccess($drop);

        $this->om->endFlushSuite();

        $this->eventDispatcher->dispatch('log', new LogCorrectionValidationChangeEvent($correction->getDrop()->getDropzone(), $correction->getDrop(), $correction));

        return $correction;
    }
public function switchCorrectionValidation(Correction $correction)
    {
        $this->om->startFlushSuite();

        $correction->setValid(!$correction->isValid());
        $this->om->persist($correction);
        $drop = $this->computeDropScore($correction->getDrop());
        $this->checkSuccess($drop);

        $this->om->endFlushSuite();

        $this->eventDispatcher->dispatch('log', new LogCorrectionValidationChangeEvent($correction->getDrop()->getDropzone(), $correction->getDrop(), $correction));

        return $correction;
    }
public function switchCorrectionValidation ( Correction $ correction ) { $ this -> om -> startFlushSuite ( ) ; $ correction -> setValid ( ! $ correction -> isValid ( ) ) ; $ this -> om -> persist ( $ correction ) ; $ drop = $ this -> computeDropScore ( $ correction -> getDrop ( ) ) ; $ this -> checkSuccess ( $ drop ) ; $ this -> om -> endFlushSuite ( ) ; $ this -> eventDispatcher -> dispatch ( 'log' , new LogCorrectionValidationChangeEvent ( $ correction -> getDrop ( ) -> getDropzone ( ) , $ correction -> getDrop ( ) , $ correction ) ) ; return $ correction ; }
Switch Correction validation.

@param Correction $correction

@return Correction
Switch Correction validation .