public function generate(Config $config)
    {
        $parts = array();
        if ($config->parent) {
            $parent = $config->parent->isRepresentant() ? $config->parent->parent : $config->parent;
            $parts[] = $this->generate($parent);
        }

        $parts[] = $this->getPrefix($config);

        return implode('_', array_filter($parts));
    }
public function generate(Config $config)
    {
        $parts = array();
        if ($config->parent) {
            $parent = $config->parent->isRepresentant() ? $config->parent->parent : $config->parent;
            $parts[] = $this->generate($parent);
        }

        $parts[] = $this->getPrefix($config);

        return implode('_', array_filter($parts));
    }
public function generate ( Config $ config ) { $ parts = array ( ) ; if ( $ config -> parent ) { $ parent = $ config -> parent -> isRepresentant ( ) ? $ config -> parent -> parent : $ config -> parent ; $ parts [ ] = $ this -> generate ( $ parent ) ; } $ parts [ ] = $ this -> getPrefix ( $ config ) ; return implode ( '_' , array_filter ( $ parts ) ) ; }
recursively build a route name

@return string
recursively build a route name