protected function setStartLink($routeConfig)
    {
        if (empty($routeConfig['startLink']) && !empty($routeConfig['startLinkLabel'])) {
            $routeConfig['startLink'] = [
                'label' => $routeConfig['startLinkLabel'],
                'link'  => '', // default
            ];
        }
        if (!empty($routeConfig['startLink'])) {
            if (!empty($routeConfig['startLink']['action'])) {
                $action = '/' . $routeConfig['moduleUid'] . '/' . $routeConfig['startLink']['action'];
                $route = [$action];
                $url = Url::toRoute($action);
            } elseif (isset($routeConfig['startLink']['link'])) {
                $link = $routeConfig['startLink']['link'];
                $link = '/' . $routeConfig['urlPrefix']
                       . ( ($link == '' || $link == '?') ? '' : ('/' . $link) )
                       ;
                //$route = ??;
                $url = Url::toRoute($link);
            } else {
                throw new Exception("Insufficient 'link' or 'action' in 'startLink' paremeter of routeConfig");
            }
            
            $tcCat = TranslationsBuilder::getBaseTransCategory($this);
            $label = $routeConfig['startLink']['label'];
            $linkData = [
                'label' => $label,
                'tcCat' => $tcCat,
                'link'  => $url,
            ];
            if (isset($route)) $linkData['route'] = $route;

            static::$_startLinks[$this->uniqueId][$routeConfig['routesType']] = $linkData;
        }
    }
protected function setStartLink($routeConfig)
    {
        if (empty($routeConfig['startLink']) && !empty($routeConfig['startLinkLabel'])) {
            $routeConfig['startLink'] = [
                'label' => $routeConfig['startLinkLabel'],
                'link'  => '', // default
            ];
        }
        if (!empty($routeConfig['startLink'])) {
            if (!empty($routeConfig['startLink']['action'])) {
                $action = '/' . $routeConfig['moduleUid'] . '/' . $routeConfig['startLink']['action'];
                $route = [$action];
                $url = Url::toRoute($action);
            } elseif (isset($routeConfig['startLink']['link'])) {
                $link = $routeConfig['startLink']['link'];
                $link = '/' . $routeConfig['urlPrefix']
                       . ( ($link == '' || $link == '?') ? '' : ('/' . $link) )
                       ;
                //$route = ??;
                $url = Url::toRoute($link);
            } else {
                throw new Exception("Insufficient 'link' or 'action' in 'startLink' paremeter of routeConfig");
            }
            
            $tcCat = TranslationsBuilder::getBaseTransCategory($this);
            $label = $routeConfig['startLink']['label'];
            $linkData = [
                'label' => $label,
                'tcCat' => $tcCat,
                'link'  => $url,
            ];
            if (isset($route)) $linkData['route'] = $route;

            static::$_startLinks[$this->uniqueId][$routeConfig['routesType']] = $linkData;
        }
    }
protected function setStartLink ( $ routeConfig ) { if ( empty ( $ routeConfig [ 'startLink' ] ) && ! empty ( $ routeConfig [ 'startLinkLabel' ] ) ) { $ routeConfig [ 'startLink' ] = [ 'label' => $ routeConfig [ 'startLinkLabel' ] , 'link' => '' , // default ] ; } if ( ! empty ( $ routeConfig [ 'startLink' ] ) ) { if ( ! empty ( $ routeConfig [ 'startLink' ] [ 'action' ] ) ) { $ action = '/' . $ routeConfig [ 'moduleUid' ] . '/' . $ routeConfig [ 'startLink' ] [ 'action' ] ; $ route = [ $ action ] ; $ url = Url :: toRoute ( $ action ) ; } elseif ( isset ( $ routeConfig [ 'startLink' ] [ 'link' ] ) ) { $ link = $ routeConfig [ 'startLink' ] [ 'link' ] ; $ link = '/' . $ routeConfig [ 'urlPrefix' ] . ( ( $ link == '' || $ link == '?' ) ? '' : ( '/' . $ link ) ) ; //$route = ??; $ url = Url :: toRoute ( $ link ) ; } else { throw new Exception ( "Insufficient 'link' or 'action' in 'startLink' paremeter of routeConfig" ) ; } $ tcCat = TranslationsBuilder :: getBaseTransCategory ( $ this ) ; $ label = $ routeConfig [ 'startLink' ] [ 'label' ] ; $ linkData = [ 'label' => $ label , 'tcCat' => $ tcCat , 'link' => $ url , ] ; if ( isset ( $ route ) ) $ linkData [ 'route' ] = $ route ; static :: $ _startLinks [ $ this -> uniqueId ] [ $ routeConfig [ 'routesType' ] ] = $ linkData ; } }
Set start link for module.
Set start link for module .