protected function loadDependencies()
    {
        foreach ($this->plugins as $id => $plugin) {
            if (!$required = $this->getDependencies($plugin)) {
                continue;
            }

            $disable = false;

            foreach ($required as $require) {
                if (!$pluginObj = $this->findByIdentifier($require)) {
                    $disable = true;
                }
                elseif ($pluginObj->disabled) {
                    $disable = true;
                }
            }

            if ($disable) {
                $this->disablePlugin($id);
            }
            else {
                $this->enablePlugin($id);
            }
        }
    }
protected function loadDependencies()
    {
        foreach ($this->plugins as $id => $plugin) {
            if (!$required = $this->getDependencies($plugin)) {
                continue;
            }

            $disable = false;

            foreach ($required as $require) {
                if (!$pluginObj = $this->findByIdentifier($require)) {
                    $disable = true;
                }
                elseif ($pluginObj->disabled) {
                    $disable = true;
                }
            }

            if ($disable) {
                $this->disablePlugin($id);
            }
            else {
                $this->enablePlugin($id);
            }
        }
    }
protected function loadDependencies ( ) { foreach ( $ this -> plugins as $ id => $ plugin ) { if ( ! $ required = $ this -> getDependencies ( $ plugin ) ) { continue ; } $ disable = false ; foreach ( $ required as $ require ) { if ( ! $ pluginObj = $ this -> findByIdentifier ( $ require ) ) { $ disable = true ; } elseif ( $ pluginObj -> disabled ) { $ disable = true ; } } if ( $ disable ) { $ this -> disablePlugin ( $ id ) ; } else { $ this -> enablePlugin ( $ id ) ; } } }
Cross checks all plugins and their dependancies, if not met plugins
are disabled and vice versa.
@return void
Cross checks all plugins and their dependancies if not met plugins are disabled and vice versa .