plugin/exo/Listener/Resource/ExerciseListener.php
public function onDelete(DeleteResourceEvent $event)
    {
        /** @var Exercise $exercise */
        $exercise = $event->getResource();

        $deletable = $this->exerciseManager->isDeletable($exercise);
        if (!$deletable) {
            // If papers, the Exercise is not completely removed
            $event->enableSoftDelete();
        }

        $event->stopPropagation();
    }
public function onDelete(DeleteResourceEvent $event)
    {
        /** @var Exercise $exercise */
        $exercise = $event->getResource();

        $deletable = $this->exerciseManager->isDeletable($exercise);
        if (!$deletable) {
            // If papers, the Exercise is not completely removed
            $event->enableSoftDelete();
        }

        $event->stopPropagation();
    }
public function onDelete ( DeleteResourceEvent $ event ) { /** @var Exercise $exercise */ $ exercise = $ event -> getResource ( ) ; $ deletable = $ this -> exerciseManager -> isDeletable ( $ exercise ) ; if ( ! $ deletable ) { // If papers, the Exercise is not completely removed $ event -> enableSoftDelete ( ) ; } $ event -> stopPropagation ( ) ; }
Deletes an Exercise resource.

@DI\Observe("delete_ujm_exercise")

@param DeleteResourceEvent $event
Deletes an Exercise resource .