original_string: public function transferObjectsToAnotherTag( $destination )
      {
          if ( !$destination instanceof self )
          {
              $destination = self::fetchWithMainTranslation( (int) $destination );
              if ( !$destination instanceof self )
                  return;
          }
  
          foreach ( $this->getTagAttributeLinks() as $tagAttributeLink )
          {
              $link = eZTagsAttributeLinkObject::fetchByObjectAttributeAndKeywordID(
                          $tagAttributeLink->attribute( 'objectattribute_id' ),
                          $tagAttributeLink->attribute( 'objectattribute_version' ),
                          $tagAttributeLink->attribute( 'object_id' ),
                          $destination->attribute( 'id' ) );
  
              if ( !$link instanceof eZTagsAttributeLinkObject )
              {
                  $tagAttributeLink->setAttribute( 'keyword_id', $destination->attribute( 'id' ) );
                  $tagAttributeLink->store();
              }
              else
              {
                  $tagAttributeLink->remove();
              }
          }
      }
code: public function transferObjectsToAnotherTag( $destination )
      {
          if ( !$destination instanceof self )
          {
              $destination = self::fetchWithMainTranslation( (int) $destination );
              if ( !$destination instanceof self )
                  return;
          }
  
          foreach ( $this->getTagAttributeLinks() as $tagAttributeLink )
          {
              $link = eZTagsAttributeLinkObject::fetchByObjectAttributeAndKeywordID(
                          $tagAttributeLink->attribute( 'objectattribute_id' ),
                          $tagAttributeLink->attribute( 'objectattribute_version' ),
                          $tagAttributeLink->attribute( 'object_id' ),
                          $destination->attribute( 'id' ) );
  
              if ( !$link instanceof eZTagsAttributeLinkObject )
              {
                  $tagAttributeLink->setAttribute( 'keyword_id', $destination->attribute( 'id' ) );
                  $tagAttributeLink->store();
              }
              else
              {
                  $tagAttributeLink->remove();
              }
          }
      }
code_tokens: public function transferObjectsToAnotherTag ( $ destination ) { if ( ! $ destination instanceof self ) { $ destination = self :: fetchWithMainTranslation ( ( int ) $ destination ) ; if ( ! $ destination instanceof self ) return ; } foreach ( $ this -> getTagAttributeLinks ( ) as $ tagAttributeLink ) { $ link = eZTagsAttributeLinkObject :: fetchByObjectAttributeAndKeywordID ( $ tagAttributeLink -> attribute ( 'objectattribute_id' ) , $ tagAttributeLink -> attribute ( 'objectattribute_version' ) , $ tagAttributeLink -> attribute ( 'object_id' ) , $ destination -> attribute ( 'id' ) ) ; if ( ! $ link instanceof eZTagsAttributeLinkObject ) { $ tagAttributeLink -> setAttribute ( 'keyword_id' , $ destination -> attribute ( 'id' ) ) ; $ tagAttributeLink -> store ( ) ; } else { $ tagAttributeLink -> remove ( ) ; } } }
docstring: Transfers all objects related to this tag, to another tag
  
  @param eZTagsObject|int $destination
docstring_tokens: Transfers all objects related to this tag to another tag