protected function _processPlugins($root, array $plugins = [])
    {
        foreach ($plugins as $plugin) {
            $controllers = $this->getControllerList($plugin);
            $pluginAlias = $this->_pluginAlias($plugin);
            $path = [
                $this->rootNode,
                $pluginAlias
            ];
            $path = implode('/', Hash::filter($path));
            
            if(!in_array($path, $this->ignorePaths) && !in_array($path, $this->ignoreActions)) {
                
                $pathNode = $this->_checkNode($path, $pluginAlias, $root->id);
                $this->foundACOs[$root->id][] = $pluginAlias;
                
                if (isset($this->foundACOs[$pathNode->id])) {
                    $this->foundACOs[$pathNode->id] += $this->_updateControllers($pathNode, $controllers, $plugin);
                } else {
                    $this->foundACOs[$pathNode->id] = $this->_updateControllers($pathNode, $controllers, $plugin);
                }

                if (isset($this->pluginPrefixes[$plugin])) {
                    foreach (array_keys($this->pluginPrefixes[$plugin]) as $prefix) {
                        $path = [
                            $this->rootNode,
                            $pluginAlias
                        ];
                        $path = implode('/', Hash::filter($path));
                        $pluginNode = $this->_checkNode($path, $pluginAlias, $root->id);
                        $this->foundACOs[$root->id][] = $pluginAlias;

                        $path = [
                            $this->rootNode,
                            $pluginAlias,
                            $prefix,
                        ];
                        $path = implode('/', Hash::filter($path));
                        $pathNode = $this->_checkNode($path, $prefix, $pluginNode->id);
                        $this->foundACOs[$pluginNode->id][] = $prefix;

                        $controllers = $this->getControllerList($plugin, $prefix);
                        if (isset($this->foundACOs[$pathNode->id])) {
                            $this->foundACOs[$pathNode->id] += $this->_updateControllers($pathNode, $controllers, $pluginAlias, $prefix);
                        } else {
                            $this->foundACOs[$pathNode->id] = $this->_updateControllers($pathNode, $controllers, $pluginAlias, $prefix);
                        }
                    }
                }
            }
        }
    }
protected function _processPlugins($root, array $plugins = [])
    {
        foreach ($plugins as $plugin) {
            $controllers = $this->getControllerList($plugin);
            $pluginAlias = $this->_pluginAlias($plugin);
            $path = [
                $this->rootNode,
                $pluginAlias
            ];
            $path = implode('/', Hash::filter($path));
            
            if(!in_array($path, $this->ignorePaths) && !in_array($path, $this->ignoreActions)) {
                
                $pathNode = $this->_checkNode($path, $pluginAlias, $root->id);
                $this->foundACOs[$root->id][] = $pluginAlias;
                
                if (isset($this->foundACOs[$pathNode->id])) {
                    $this->foundACOs[$pathNode->id] += $this->_updateControllers($pathNode, $controllers, $plugin);
                } else {
                    $this->foundACOs[$pathNode->id] = $this->_updateControllers($pathNode, $controllers, $plugin);
                }

                if (isset($this->pluginPrefixes[$plugin])) {
                    foreach (array_keys($this->pluginPrefixes[$plugin]) as $prefix) {
                        $path = [
                            $this->rootNode,
                            $pluginAlias
                        ];
                        $path = implode('/', Hash::filter($path));
                        $pluginNode = $this->_checkNode($path, $pluginAlias, $root->id);
                        $this->foundACOs[$root->id][] = $pluginAlias;

                        $path = [
                            $this->rootNode,
                            $pluginAlias,
                            $prefix,
                        ];
                        $path = implode('/', Hash::filter($path));
                        $pathNode = $this->_checkNode($path, $prefix, $pluginNode->id);
                        $this->foundACOs[$pluginNode->id][] = $prefix;

                        $controllers = $this->getControllerList($plugin, $prefix);
                        if (isset($this->foundACOs[$pathNode->id])) {
                            $this->foundACOs[$pathNode->id] += $this->_updateControllers($pathNode, $controllers, $pluginAlias, $prefix);
                        } else {
                            $this->foundACOs[$pathNode->id] = $this->_updateControllers($pathNode, $controllers, $pluginAlias, $prefix);
                        }
                    }
                }
            }
        }
    }
protected function _processPlugins ( $ root , array $ plugins = [ ] ) { foreach ( $ plugins as $ plugin ) { $ controllers = $ this -> getControllerList ( $ plugin ) ; $ pluginAlias = $ this -> _pluginAlias ( $ plugin ) ; $ path = [ $ this -> rootNode , $ pluginAlias ] ; $ path = implode ( '/' , Hash :: filter ( $ path ) ) ; if ( ! in_array ( $ path , $ this -> ignorePaths ) && ! in_array ( $ path , $ this -> ignoreActions ) ) { $ pathNode = $ this -> _checkNode ( $ path , $ pluginAlias , $ root -> id ) ; $ this -> foundACOs [ $ root -> id ] [ ] = $ pluginAlias ; if ( isset ( $ this -> foundACOs [ $ pathNode -> id ] ) ) { $ this -> foundACOs [ $ pathNode -> id ] += $ this -> _updateControllers ( $ pathNode , $ controllers , $ plugin ) ; } else { $ this -> foundACOs [ $ pathNode -> id ] = $ this -> _updateControllers ( $ pathNode , $ controllers , $ plugin ) ; } if ( isset ( $ this -> pluginPrefixes [ $ plugin ] ) ) { foreach ( array_keys ( $ this -> pluginPrefixes [ $ plugin ] ) as $ prefix ) { $ path = [ $ this -> rootNode , $ pluginAlias ] ; $ path = implode ( '/' , Hash :: filter ( $ path ) ) ; $ pluginNode = $ this -> _checkNode ( $ path , $ pluginAlias , $ root -> id ) ; $ this -> foundACOs [ $ root -> id ] [ ] = $ pluginAlias ; $ path = [ $ this -> rootNode , $ pluginAlias , $ prefix , ] ; $ path = implode ( '/' , Hash :: filter ( $ path ) ) ; $ pathNode = $ this -> _checkNode ( $ path , $ prefix , $ pluginNode -> id ) ; $ this -> foundACOs [ $ pluginNode -> id ] [ ] = $ prefix ; $ controllers = $ this -> getControllerList ( $ plugin , $ prefix ) ; if ( isset ( $ this -> foundACOs [ $ pathNode -> id ] ) ) { $ this -> foundACOs [ $ pathNode -> id ] += $ this -> _updateControllers ( $ pathNode , $ controllers , $ pluginAlias , $ prefix ) ; } else { $ this -> foundACOs [ $ pathNode -> id ] = $ this -> _updateControllers ( $ pathNode , $ controllers , $ pluginAlias , $ prefix ) ; } } } } } }
Updates the Aco Tree with all Plugins.

@param \Acl\Model\Entity\Aco $root The root note of Aco Tree
@param array $plugins list of App plugins
@return void
Updates the Aco Tree with all Plugins .