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();
            }
        }
    }
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();
            }
        }
    }
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 ( ) ; } } }
Transfers all objects related to this tag, to another tag

@param eZTagsObject|int $destination
Transfers all objects related to this tag to another tag