src-dev/Mouf/Controllers/MoufController.php
public function deleteInstances($selfedit = "false", $instancesNames = array(), $returnurl = null) {
        $this->selfedit = $selfedit;

        if ($selfedit == "true") {
            $this->moufManager = MoufManager::getMoufManager();
        } else {
            $this->moufManager = MoufManager::getMoufManagerHiddenInstance();
        }

        if(!empty($instancesNames)) {
            foreach($instancesNames as $instanceName) {
                $this->moufManager->removeComponent($instanceName);
            }
            $this->moufManager->rewriteMouf();
        }

        if ($returnurl) {
            header("Location:".$returnurl);
        } else {
            header("Location: .?selfedit=".$selfedit);
        }
    }
public function deleteInstances($selfedit = "false", $instancesNames = array(), $returnurl = null) {
        $this->selfedit = $selfedit;

        if ($selfedit == "true") {
            $this->moufManager = MoufManager::getMoufManager();
        } else {
            $this->moufManager = MoufManager::getMoufManagerHiddenInstance();
        }

        if(!empty($instancesNames)) {
            foreach($instancesNames as $instanceName) {
                $this->moufManager->removeComponent($instanceName);
            }
            $this->moufManager->rewriteMouf();
        }

        if ($returnurl) {
            header("Location:".$returnurl);
        } else {
            header("Location: .?selfedit=".$selfedit);
        }
    }
public function deleteInstances ( $ selfedit = "false" , $ instancesNames = array ( ) , $ returnurl = null ) { $ this -> selfedit = $ selfedit ; if ( $ selfedit == "true" ) { $ this -> moufManager = MoufManager :: getMoufManager ( ) ; } else { $ this -> moufManager = MoufManager :: getMoufManagerHiddenInstance ( ) ; } if ( ! empty ( $ instancesNames ) ) { foreach ( $ instancesNames as $ instanceName ) { $ this -> moufManager -> removeComponent ( $ instanceName ) ; } $ this -> moufManager -> rewriteMouf ( ) ; } if ( $ returnurl ) { header ( "Location:" . $ returnurl ) ; } else { header ( "Location: .?selfedit=" . $ selfedit ) ; } }
Removes all the instances passed in parameter
@Action
@Logged
@param string $selfedit
@param array $instancesNames
@param string $returnurl
@throws \Mouf\MoufException
Removes all the instances passed in parameter