lib/AbstractPicoPlugin.php
protected function checkDependants($recursive)
    {
        $dependants = $this->getDependants();
        if ($dependants) {
            if ($recursive) {
                foreach ($this->getDependants() as $pluginName => $plugin) {
                    if ($plugin->isEnabled()) {
                        if (!$plugin->isStatusChanged()) {
                            $plugin->setEnabled(false, true, true);
                        } else {
                            throw new RuntimeException(
                                "Unable to disable plugin '" . get_called_class() . "': "
                                . "Required by manually enabled plugin '" . $pluginName . "'"
                            );
                        }
                    }
                }
            } else {
                $dependantsList = 'plugin' . ((count($dependants) > 1) ? 's' : '') . ' '
                    . "'" . implode("', '", array_keys($dependants)) . "'";
                throw new RuntimeException(
                    "Unable to disable plugin '" . get_called_class() . "': "
                    . "Required by " . $dependantsList
                );
            }
        }
    }
protected function checkDependants($recursive)
    {
        $dependants = $this->getDependants();
        if ($dependants) {
            if ($recursive) {
                foreach ($this->getDependants() as $pluginName => $plugin) {
                    if ($plugin->isEnabled()) {
                        if (!$plugin->isStatusChanged()) {
                            $plugin->setEnabled(false, true, true);
                        } else {
                            throw new RuntimeException(
                                "Unable to disable plugin '" . get_called_class() . "': "
                                . "Required by manually enabled plugin '" . $pluginName . "'"
                            );
                        }
                    }
                }
            } else {
                $dependantsList = 'plugin' . ((count($dependants) > 1) ? 's' : '') . ' '
                    . "'" . implode("', '", array_keys($dependants)) . "'";
                throw new RuntimeException(
                    "Unable to disable plugin '" . get_called_class() . "': "
                    . "Required by " . $dependantsList
                );
            }
        }
    }
protected function checkDependants ( $ recursive ) { $ dependants = $ this -> getDependants ( ) ; if ( $ dependants ) { if ( $ recursive ) { foreach ( $ this -> getDependants ( ) as $ pluginName => $ plugin ) { if ( $ plugin -> isEnabled ( ) ) { if ( ! $ plugin -> isStatusChanged ( ) ) { $ plugin -> setEnabled ( false , true , true ) ; } else { throw new RuntimeException ( "Unable to disable plugin '" . get_called_class ( ) . "': " . "Required by manually enabled plugin '" . $ pluginName . "'" ) ; } } } } else { $ dependantsList = 'plugin' . ( ( count ( $ dependants ) > 1 ) ? 's' : '' ) . ' ' . "'" . implode ( "', '" , array_keys ( $ dependants ) ) . "'" ; throw new RuntimeException ( "Unable to disable plugin '" . get_called_class ( ) . "': " . "Required by " . $ dependantsList ) ; } } }
Disables all plugins which depend on this plugin

@see PicoPluginInterface::getDependants()

@param bool $recursive disabled dependant plugins automatically

@return void

@throws RuntimeException thrown when a dependency fails
Disables all plugins which depend on this plugin