private function boot (){
        $this->init = true;
        $configsObjectsDeft = $iconsDefinition = [];
        $this->linkGeneratorItemsForClass = [];
        foreach ($this->linkGeneratorItems as $linkGeneratorItem) {
            $configObjects = $linkGeneratorItem->getConfigObjects();
            foreach ($configObjects as $key => $configObject) {
//                $configObject["linkGeneratorItem"] =  $linkGeneratorItem;
                $configObjects[$key]["linkGeneratorItem"] =  $linkGeneratorItem;
                $this->linkGeneratorItemsForClass[$configObject["class"]] = $linkGeneratorItem;
            }
//            var_dump($configObjects);
//            die;
            
            $configsObjectsDeft = array_merge($configsObjectsDeft,$configObjects);
            $iconsDefinition = array_merge($iconsDefinition,$linkGeneratorItem->getIconsDefinition());
        }
        $this->iconsDefinition = $iconsDefinition;
        $defaultConfig = array(
            'type' => self::TYPE_LINK_DEFAULT,
            'icon' => null,
            'method' => 'renderDefault',
            'routeParameters' => array(),
            'buildUrl' => null,
            'labelMethod' => null,
            'translation_domain' => null,
            'linkGeneratorItem' => null,
        );
        $configsObjects = array();
//        var_dump($configsObjectsDeft);
        foreach ($configsObjectsDeft as $key => $configObject)
        {
//            var_dump($key);
            $config = array_merge($defaultConfig,$configObject);
            if(!isset($config['class'])){
                throw new LogicException(sprintf('The class for item "%s" not defined',$key));
            }
            $class = $config['class'];
            if(!isset($configsObjects[$class])){
                $configsObjects[$class] = array(
                    'type' => array(),
                );
            }
            $type = $config['type'];
            if(isset($configsObjects[$class]['type'][$type])){
                throw new LogicException(sprintf('The type "%s" for the class "%s" in item "%s" is already defined (Change type o remove definition)',$type,$class,$key));
            }
            if($defaultConfig['method'] == $config['method'] && !isset($configObject['route'])){
                throw new LogicException(sprintf('The route for the class "%s" in item "%s" is required (optional with custom method)',$class,$key));
            }
            
            $configsObjects[$class]['type'][$type] = $config;
        }
//        throw new \Exception();
        
        $this->configsObjects = $configsObjects;
    }
private function boot (){
        $this->init = true;
        $configsObjectsDeft = $iconsDefinition = [];
        $this->linkGeneratorItemsForClass = [];
        foreach ($this->linkGeneratorItems as $linkGeneratorItem) {
            $configObjects = $linkGeneratorItem->getConfigObjects();
            foreach ($configObjects as $key => $configObject) {
//                $configObject["linkGeneratorItem"] =  $linkGeneratorItem;
                $configObjects[$key]["linkGeneratorItem"] =  $linkGeneratorItem;
                $this->linkGeneratorItemsForClass[$configObject["class"]] = $linkGeneratorItem;
            }
//            var_dump($configObjects);
//            die;
            
            $configsObjectsDeft = array_merge($configsObjectsDeft,$configObjects);
            $iconsDefinition = array_merge($iconsDefinition,$linkGeneratorItem->getIconsDefinition());
        }
        $this->iconsDefinition = $iconsDefinition;
        $defaultConfig = array(
            'type' => self::TYPE_LINK_DEFAULT,
            'icon' => null,
            'method' => 'renderDefault',
            'routeParameters' => array(),
            'buildUrl' => null,
            'labelMethod' => null,
            'translation_domain' => null,
            'linkGeneratorItem' => null,
        );
        $configsObjects = array();
//        var_dump($configsObjectsDeft);
        foreach ($configsObjectsDeft as $key => $configObject)
        {
//            var_dump($key);
            $config = array_merge($defaultConfig,$configObject);
            if(!isset($config['class'])){
                throw new LogicException(sprintf('The class for item "%s" not defined',$key));
            }
            $class = $config['class'];
            if(!isset($configsObjects[$class])){
                $configsObjects[$class] = array(
                    'type' => array(),
                );
            }
            $type = $config['type'];
            if(isset($configsObjects[$class]['type'][$type])){
                throw new LogicException(sprintf('The type "%s" for the class "%s" in item "%s" is already defined (Change type o remove definition)',$type,$class,$key));
            }
            if($defaultConfig['method'] == $config['method'] && !isset($configObject['route'])){
                throw new LogicException(sprintf('The route for the class "%s" in item "%s" is required (optional with custom method)',$class,$key));
            }
            
            $configsObjects[$class]['type'][$type] = $config;
        }
//        throw new \Exception();
        
        $this->configsObjects = $configsObjects;
    }
private function boot ( ) { $ this -> init = true ; $ configsObjectsDeft = $ iconsDefinition = [ ] ; $ this -> linkGeneratorItemsForClass = [ ] ; foreach ( $ this -> linkGeneratorItems as $ linkGeneratorItem ) { $ configObjects = $ linkGeneratorItem -> getConfigObjects ( ) ; foreach ( $ configObjects as $ key => $ configObject ) { //                $configObject["linkGeneratorItem"] =  $linkGeneratorItem; $ configObjects [ $ key ] [ "linkGeneratorItem" ] = $ linkGeneratorItem ; $ this -> linkGeneratorItemsForClass [ $ configObject [ "class" ] ] = $ linkGeneratorItem ; } //            var_dump($configObjects); //            die; $ configsObjectsDeft = array_merge ( $ configsObjectsDeft , $ configObjects ) ; $ iconsDefinition = array_merge ( $ iconsDefinition , $ linkGeneratorItem -> getIconsDefinition ( ) ) ; } $ this -> iconsDefinition = $ iconsDefinition ; $ defaultConfig = array ( 'type' => self :: TYPE_LINK_DEFAULT , 'icon' => null , 'method' => 'renderDefault' , 'routeParameters' => array ( ) , 'buildUrl' => null , 'labelMethod' => null , 'translation_domain' => null , 'linkGeneratorItem' => null , ) ; $ configsObjects = array ( ) ; //        var_dump($configsObjectsDeft); foreach ( $ configsObjectsDeft as $ key => $ configObject ) { //            var_dump($key); $ config = array_merge ( $ defaultConfig , $ configObject ) ; if ( ! isset ( $ config [ 'class' ] ) ) { throw new LogicException ( sprintf ( 'The class for item "%s" not defined' , $ key ) ) ; } $ class = $ config [ 'class' ] ; if ( ! isset ( $ configsObjects [ $ class ] ) ) { $ configsObjects [ $ class ] = array ( 'type' => array ( ) , ) ; } $ type = $ config [ 'type' ] ; if ( isset ( $ configsObjects [ $ class ] [ 'type' ] [ $ type ] ) ) { throw new LogicException ( sprintf ( 'The type "%s" for the class "%s" in item "%s" is already defined (Change type o remove definition)' , $ type , $ class , $ key ) ) ; } if ( $ defaultConfig [ 'method' ] == $ config [ 'method' ] && ! isset ( $ configObject [ 'route' ] ) ) { throw new LogicException ( sprintf ( 'The route for the class "%s" in item "%s" is required (optional with custom method)' , $ class , $ key ) ) ; } $ configsObjects [ $ class ] [ 'type' ] [ $ type ] = $ config ; } //        throw new \Exception(); $ this -> configsObjects = $ configsObjects ; }
Genera la configuracion de los objetos agreagados
@throws LogicException
Genera la configuracion de los objetos agreagados