original_string: protected static function createContentLink($node)
      {
          static::_prepare();
          $url = false;
  
          // node with external/internal link: get URL from 'route' field
          if (empty($node->text) && !empty($node->route)) {
              $url = static::routeToLink($node->route);
          }
  
          // site tree content node: create URL for node from visible site tree if this node has original route
          if ($url === false) {
              $url = Url::toRoute([static::$_routeActionView, 'id' => $node->id]);
              $parts = parse_url($url);
              if (!empty($parts['path'])) {
                  $url = $parts['path'];
                  if (strstr($url, static::$_routeActionView)) { // it's fake link contain action UID and GET-parameter "id={$id}"
                      $url = false;
                  }
              }
          }
  
          // node has content but any links yet: create URL for node out of visible site tree (submenu tree)
          if ($url === false && empty($node->route) && !empty($node->text)) {
              $url = Url::toRoute([static::$_routeActionShow, 'id' => $node->id, 'slug' => $node->slug]);
          }
  
          return $url;
      }
code: protected static function createContentLink($node)
      {
          static::_prepare();
          $url = false;
  
          // node with external/internal link: get URL from 'route' field
          if (empty($node->text) && !empty($node->route)) {
              $url = static::routeToLink($node->route);
          }
  
          // site tree content node: create URL for node from visible site tree if this node has original route
          if ($url === false) {
              $url = Url::toRoute([static::$_routeActionView, 'id' => $node->id]);
              $parts = parse_url($url);
              if (!empty($parts['path'])) {
                  $url = $parts['path'];
                  if (strstr($url, static::$_routeActionView)) { // it's fake link contain action UID and GET-parameter "id={$id}"
                      $url = false;
                  }
              }
          }
  
          // node has content but any links yet: create URL for node out of visible site tree (submenu tree)
          if ($url === false && empty($node->route) && !empty($node->text)) {
              $url = Url::toRoute([static::$_routeActionShow, 'id' => $node->id, 'slug' => $node->slug]);
          }
  
          return $url;
      }
code_tokens: protected static function createContentLink ( $ node ) { static :: _prepare ( ) ; $ url = false ; // node with external/internal link: get URL from 'route' field if ( empty ( $ node -> text ) && ! empty ( $ node -> route ) ) { $ url = static :: routeToLink ( $ node -> route ) ; } // site tree content node: create URL for node from visible site tree if this node has original route if ( $ url === false ) { $ url = Url :: toRoute ( [ static :: $ _routeActionView , 'id' => $ node -> id ] ) ; $ parts = parse_url ( $ url ) ; if ( ! empty ( $ parts [ 'path' ] ) ) { $ url = $ parts [ 'path' ] ; if ( strstr ( $ url , static :: $ _routeActionView ) ) { // it's fake link contain action UID and GET-parameter "id={$id}" $ url = false ; } } } // node has content but any links yet: create URL for node out of visible site tree (submenu tree) if ( $ url === false && empty ( $ node -> route ) && ! empty ( $ node -> text ) ) { $ url = Url :: toRoute ( [ static :: $ _routeActionShow , 'id' => $ node -> id , 'slug' => $ node -> slug ] ) ; } return $ url ; }
docstring: Create link for node.
  @param Content $node
  @return string|false
docstring_tokens: Create link for node .