lib/AbstractPicoPlugin.php
protected function checkDependencies($recursive)
    {
        foreach ($this->getDependencies() as $pluginName) {
            try {
                $plugin = $this->getPlugin($pluginName);
            } catch (RuntimeException $e) {
                throw new RuntimeException(
                    "Unable to enable plugin '" . get_called_class() . "': "
                    . "Required plugin '" . $pluginName . "' not found"
                );
            }

            // plugins which don't implement PicoPluginInterface are always enabled
            if (($plugin instanceof PicoPluginInterface) && !$plugin->isEnabled()) {
                if ($recursive) {
                    if (!$plugin->isStatusChanged()) {
                        $plugin->setEnabled(true, true, true);
                    } else {
                        throw new RuntimeException(
                            "Unable to enable plugin '" . get_called_class() . "': "
                            . "Required plugin '" . $pluginName . "' was disabled manually"
                        );
                    }
                } else {
                    throw new RuntimeException(
                        "Unable to enable plugin '" . get_called_class() . "': "
                        . "Required plugin '" . $pluginName . "' is disabled"
                    );
                }
            }
        }
    }
protected function checkDependencies($recursive)
    {
        foreach ($this->getDependencies() as $pluginName) {
            try {
                $plugin = $this->getPlugin($pluginName);
            } catch (RuntimeException $e) {
                throw new RuntimeException(
                    "Unable to enable plugin '" . get_called_class() . "': "
                    . "Required plugin '" . $pluginName . "' not found"
                );
            }

            // plugins which don't implement PicoPluginInterface are always enabled
            if (($plugin instanceof PicoPluginInterface) && !$plugin->isEnabled()) {
                if ($recursive) {
                    if (!$plugin->isStatusChanged()) {
                        $plugin->setEnabled(true, true, true);
                    } else {
                        throw new RuntimeException(
                            "Unable to enable plugin '" . get_called_class() . "': "
                            . "Required plugin '" . $pluginName . "' was disabled manually"
                        );
                    }
                } else {
                    throw new RuntimeException(
                        "Unable to enable plugin '" . get_called_class() . "': "
                        . "Required plugin '" . $pluginName . "' is disabled"
                    );
                }
            }
        }
    }
protected function checkDependencies ( $ recursive ) { foreach ( $ this -> getDependencies ( ) as $ pluginName ) { try { $ plugin = $ this -> getPlugin ( $ pluginName ) ; } catch ( RuntimeException $ e ) { throw new RuntimeException ( "Unable to enable plugin '" . get_called_class ( ) . "': " . "Required plugin '" . $ pluginName . "' not found" ) ; } // plugins which don't implement PicoPluginInterface are always enabled if ( ( $ plugin instanceof PicoPluginInterface ) && ! $ plugin -> isEnabled ( ) ) { if ( $ recursive ) { if ( ! $ plugin -> isStatusChanged ( ) ) { $ plugin -> setEnabled ( true , true , true ) ; } else { throw new RuntimeException ( "Unable to enable plugin '" . get_called_class ( ) . "': " . "Required plugin '" . $ pluginName . "' was disabled manually" ) ; } } else { throw new RuntimeException ( "Unable to enable plugin '" . get_called_class ( ) . "': " . "Required plugin '" . $ pluginName . "' is disabled" ) ; } } } }
Enables all plugins which this plugin depends on

@see PicoPluginInterface::getDependencies()

@param bool $recursive enable required plugins automatically

@return void

@throws RuntimeException thrown when a dependency fails
Enables all plugins which this plugin depends on