original_string: static public function generateModuleResultPath( $tag = false, $urlToGenerate = null, $textPart = false, $mainTranslation = true )
      {
          $moduleResultPath = array();
  
          if ( is_string( $textPart ) )
          {
              $moduleResultPath[] = array( 'text'   => $textPart,
                                           'url'    => false );
          }
  
          if ( $tag instanceof self )
          {
              /** @var eZTagsObject $tag */
              $moduleResultPath[] = array( 'tag_id' => $tag->attribute( 'id' ),
                                           'text'   => $tag->attribute( 'keyword' ),
                                           'url'    => false );
  
              /** @var eZTagsObject[] $path */
              $path = $tag->getPath( true, $mainTranslation );
              if ( is_array( $path ) && !empty( $path ) )
              {
                  foreach ( $path as $pathElement )
                  {
                      // if $urlToGenerate === null, generate no urls
                      $url = false;
                      if ( $urlToGenerate !== null )
                      {
                          // if true generate nice urls
                          if ( $urlToGenerate )
                              $url = $pathElement->getUrl();
                          // else generate urls with ID
                          else
                              $url = 'tags/id/' . $pathElement->attribute( 'id' );
                      }
  
                      $moduleResultPath[] = array( 'tag_id' => $pathElement->attribute( 'id' ),
                                                   'text'   => $pathElement->attribute( 'keyword' ),
                                                   'url'    => $url );
                  }
              }
          }
  
          return array_reverse( $moduleResultPath );
      }
code: static public function generateModuleResultPath( $tag = false, $urlToGenerate = null, $textPart = false, $mainTranslation = true )
      {
          $moduleResultPath = array();
  
          if ( is_string( $textPart ) )
          {
              $moduleResultPath[] = array( 'text'   => $textPart,
                                           'url'    => false );
          }
  
          if ( $tag instanceof self )
          {
              /** @var eZTagsObject $tag */
              $moduleResultPath[] = array( 'tag_id' => $tag->attribute( 'id' ),
                                           'text'   => $tag->attribute( 'keyword' ),
                                           'url'    => false );
  
              /** @var eZTagsObject[] $path */
              $path = $tag->getPath( true, $mainTranslation );
              if ( is_array( $path ) && !empty( $path ) )
              {
                  foreach ( $path as $pathElement )
                  {
                      // if $urlToGenerate === null, generate no urls
                      $url = false;
                      if ( $urlToGenerate !== null )
                      {
                          // if true generate nice urls
                          if ( $urlToGenerate )
                              $url = $pathElement->getUrl();
                          // else generate urls with ID
                          else
                              $url = 'tags/id/' . $pathElement->attribute( 'id' );
                      }
  
                      $moduleResultPath[] = array( 'tag_id' => $pathElement->attribute( 'id' ),
                                                   'text'   => $pathElement->attribute( 'keyword' ),
                                                   'url'    => $url );
                  }
              }
          }
  
          return array_reverse( $moduleResultPath );
      }
code_tokens: static public function generateModuleResultPath ( $ tag = false , $ urlToGenerate = null , $ textPart = false , $ mainTranslation = true ) { $ moduleResultPath = array ( ) ; if ( is_string ( $ textPart ) ) { $ moduleResultPath [ ] = array ( 'text' => $ textPart , 'url' => false ) ; } if ( $ tag instanceof self ) { /** @var eZTagsObject $tag */ $ moduleResultPath [ ] = array ( 'tag_id' => $ tag -> attribute ( 'id' ) , 'text' => $ tag -> attribute ( 'keyword' ) , 'url' => false ) ; /** @var eZTagsObject[] $path */ $ path = $ tag -> getPath ( true , $ mainTranslation ) ; if ( is_array ( $ path ) && ! empty ( $ path ) ) { foreach ( $ path as $ pathElement ) { // if $urlToGenerate === null, generate no urls $ url = false ; if ( $ urlToGenerate !== null ) { // if true generate nice urls if ( $ urlToGenerate ) $ url = $ pathElement -> getUrl ( ) ; // else generate urls with ID else $ url = 'tags/id/' . $ pathElement -> attribute ( 'id' ) ; } $ moduleResultPath [ ] = array ( 'tag_id' => $ pathElement -> attribute ( 'id' ) , 'text' => $ pathElement -> attribute ( 'keyword' ) , 'url' => $ url ) ; } } } return array_reverse ( $ moduleResultPath ) ; }
docstring: Generates module result path for this tag, used in all module views
  
  @static
  
  @param mixed $tag
  @param mixed $urlToGenerate
  @param mixed $textPart
  @param bool $mainTranslation
  
  @return array
docstring_tokens: Generates module result path for this tag used in all module views