protected function trash($step)
    {
        $locationCollection = $this->matchLocations('delete', $step);

        $this->setReferences($locationCollection, $step);

        $trashService = $this->repository->getTrashService();

        foreach ($locationCollection as $location) {
            $trashService->trash($location);
        }

        return $locationCollection;
    }
protected function trash($step)
    {
        $locationCollection = $this->matchLocations('delete', $step);

        $this->setReferences($locationCollection, $step);

        $trashService = $this->repository->getTrashService();

        foreach ($locationCollection as $location) {
            $trashService->trash($location);
        }

        return $locationCollection;
    }
protected function trash ( $ step ) { $ locationCollection = $ this -> matchLocations ( 'delete' , $ step ) ; $ this -> setReferences ( $ locationCollection , $ step ) ; $ trashService = $ this -> repository -> getTrashService ( ) ; foreach ( $ locationCollection as $ location ) { $ trashService -> trash ( $ location ) ; } return $ locationCollection ; }
Delete locations sending them to the trash
Delete locations sending them to the trash