plugin/drop-zone/Manager/DropzoneManager.php
public function closeAllUnfinishedDrops(Dropzone $dropzone)
    {
        $this->om->startFlushSuite();

        $currentDate = new \DateTime();
        $drops = $this->dropRepo->findBy(['dropzone' => $dropzone, 'finished' => false]);

        /** @var Drop $drop */
        foreach ($drops as $drop) {
            $drop->setFinished(true);
            $drop->setDropDate($currentDate);
            $drop->setAutoClosedDrop(true);
            $this->om->persist($drop);
        }
        $dropzone->setDropClosed(true);
        $this->om->persist($dropzone);

        $this->om->endFlushSuite();
    }
public function closeAllUnfinishedDrops(Dropzone $dropzone)
    {
        $this->om->startFlushSuite();

        $currentDate = new \DateTime();
        $drops = $this->dropRepo->findBy(['dropzone' => $dropzone, 'finished' => false]);

        /** @var Drop $drop */
        foreach ($drops as $drop) {
            $drop->setFinished(true);
            $drop->setDropDate($currentDate);
            $drop->setAutoClosedDrop(true);
            $this->om->persist($drop);
        }
        $dropzone->setDropClosed(true);
        $this->om->persist($dropzone);

        $this->om->endFlushSuite();
    }
public function closeAllUnfinishedDrops ( Dropzone $ dropzone ) { $ this -> om -> startFlushSuite ( ) ; $ currentDate = new \ DateTime ( ) ; $ drops = $ this -> dropRepo -> findBy ( [ 'dropzone' => $ dropzone , 'finished' => false ] ) ; /** @var Drop $drop */ foreach ( $ drops as $ drop ) { $ drop -> setFinished ( true ) ; $ drop -> setDropDate ( $ currentDate ) ; $ drop -> setAutoClosedDrop ( true ) ; $ this -> om -> persist ( $ drop ) ; } $ dropzone -> setDropClosed ( true ) ; $ this -> om -> persist ( $ dropzone ) ; $ this -> om -> endFlushSuite ( ) ; }
Closes all unfinished drops.

@param Dropzone $dropzone
Closes all unfinished drops .