public function metaData( $attribute )
    {
        /** @var $eZTags eZTags */
        $eZTags = $attribute->content();
        if ( !$eZTags instanceof eZTags )
            return '';

        $indexSynonyms = eZINI::instance( 'eztags.ini' )->variable( 'SearchSettings', 'IndexSynonyms' ) === 'enabled';

        $keywords = array();
        $tags = $eZTags->attribute( 'tags' );

        /** @var eZTagsObject $tag */
        foreach ( $tags as $tag )
        {
            if ( !$indexSynonyms && $tag->isSynonym() )
                $tag = $tag->getMainTag();

            if ( $tag instanceof eZTagsObject )
            {
                $keyword = $tag->getKeyword( $attribute->attribute( 'language_code' ) );
                if ( !$keyword )
                {
                    //fall back to main language
                    /** @var eZContentLanguage $mainLanguage */
                    $mainLanguage = eZContentLanguage::fetch( $tag->attribute( 'main_language_id') );
                    if ( $mainLanguage instanceof eZContentLanguage )
                        $keyword = $tag->getKeyword( $mainLanguage->attribute( 'locale' ) );
                }
                if ( $keyword )
                    $keywords[] = $keyword;
            }
        }

        return implode( ', ', array_unique( $keywords ) );
    }
public function metaData( $attribute )
    {
        /** @var $eZTags eZTags */
        $eZTags = $attribute->content();
        if ( !$eZTags instanceof eZTags )
            return '';

        $indexSynonyms = eZINI::instance( 'eztags.ini' )->variable( 'SearchSettings', 'IndexSynonyms' ) === 'enabled';

        $keywords = array();
        $tags = $eZTags->attribute( 'tags' );

        /** @var eZTagsObject $tag */
        foreach ( $tags as $tag )
        {
            if ( !$indexSynonyms && $tag->isSynonym() )
                $tag = $tag->getMainTag();

            if ( $tag instanceof eZTagsObject )
            {
                $keyword = $tag->getKeyword( $attribute->attribute( 'language_code' ) );
                if ( !$keyword )
                {
                    //fall back to main language
                    /** @var eZContentLanguage $mainLanguage */
                    $mainLanguage = eZContentLanguage::fetch( $tag->attribute( 'main_language_id') );
                    if ( $mainLanguage instanceof eZContentLanguage )
                        $keyword = $tag->getKeyword( $mainLanguage->attribute( 'locale' ) );
                }
                if ( $keyword )
                    $keywords[] = $keyword;
            }
        }

        return implode( ', ', array_unique( $keywords ) );
    }
public function metaData ( $ attribute ) { /** @var $eZTags eZTags */ $ eZTags = $ attribute -> content ( ) ; if ( ! $ eZTags instanceof eZTags ) return '' ; $ indexSynonyms = eZINI :: instance ( 'eztags.ini' ) -> variable ( 'SearchSettings' , 'IndexSynonyms' ) === 'enabled' ; $ keywords = array ( ) ; $ tags = $ eZTags -> attribute ( 'tags' ) ; /** @var eZTagsObject $tag */ foreach ( $ tags as $ tag ) { if ( ! $ indexSynonyms && $ tag -> isSynonym ( ) ) $ tag = $ tag -> getMainTag ( ) ; if ( $ tag instanceof eZTagsObject ) { $ keyword = $ tag -> getKeyword ( $ attribute -> attribute ( 'language_code' ) ) ; if ( ! $ keyword ) { //fall back to main language /** @var eZContentLanguage $mainLanguage */ $ mainLanguage = eZContentLanguage :: fetch ( $ tag -> attribute ( 'main_language_id' ) ) ; if ( $ mainLanguage instanceof eZContentLanguage ) $ keyword = $ tag -> getKeyword ( $ mainLanguage -> attribute ( 'locale' ) ) ; } if ( $ keyword ) $ keywords [ ] = $ keyword ; } } return implode ( ', ' , array_unique ( $ keywords ) ) ; }
Returns the meta data used for storing search indices

@param eZContentObjectAttribute $attribute

@return string
Returns the meta data used for storing search indices