original_string: 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;
          }
      }
code: 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;
          }
      }
code_tokens: 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 ; } }
docstring: Set start link for module.
docstring_tokens: Set start link for module .