classes/ezfezpsolrquerybuilder.php
protected function getContentClassFilterQuery( $contentClassIdent )
    {
		if ( empty( $contentClassIdent ) )
        {
            return null;
        }

        if ( is_array( $contentClassIdent ) )
        {
            $classQueryParts = array();
            foreach ( $contentClassIdent as $classID )
            {
                $classID = trim( $classID );
                if ( empty( $classID ) )
                {
                    continue;
                }
                if ( (int)$classID . '' == $classID . '' )
                {
                    $classQueryParts[] = eZSolr::getMetaFieldName( 'contentclass_id' ) . ':' . $classID;
                }
                elseif ( is_string( $classID ) )
                {
                    if ( $class = eZContentClass::fetchByIdentifier( $classID ) )
                    {
                        $classQueryParts[] = eZSolr::getMetaFieldName( 'contentclass_id' ) . ':' . $class->attribute( 'id' );
                    }
                }
            	else
				{
					eZDebug::writeError( "Unknown class_id filtering parameter: $classID", __METHOD__ );
				}
            }

            return implode( ' OR ', $classQueryParts );
        }
        elseif ( (int)$contentClassIdent . '' == $contentClassIdent . '' )
        {
            return eZSolr::getMetaFieldName( 'contentclass_id' ) . ':' . $contentClassIdent;
        }
        elseif ( is_string( $contentClassIdent ) )
        {
            if ( $class = eZContentClass::fetchByIdentifier( $contentClassIdent ) )
            {
                return eZSolr::getMetaFieldName( 'contentclass_id' ) . ':' . $class->attribute( 'id' );
            }
        }

        eZDebug::writeError( 'No valid content class', __METHOD__ );

        return null;
    }
protected function getContentClassFilterQuery( $contentClassIdent )
    {
		if ( empty( $contentClassIdent ) )
        {
            return null;
        }

        if ( is_array( $contentClassIdent ) )
        {
            $classQueryParts = array();
            foreach ( $contentClassIdent as $classID )
            {
                $classID = trim( $classID );
                if ( empty( $classID ) )
                {
                    continue;
                }
                if ( (int)$classID . '' == $classID . '' )
                {
                    $classQueryParts[] = eZSolr::getMetaFieldName( 'contentclass_id' ) . ':' . $classID;
                }
                elseif ( is_string( $classID ) )
                {
                    if ( $class = eZContentClass::fetchByIdentifier( $classID ) )
                    {
                        $classQueryParts[] = eZSolr::getMetaFieldName( 'contentclass_id' ) . ':' . $class->attribute( 'id' );
                    }
                }
            	else
				{
					eZDebug::writeError( "Unknown class_id filtering parameter: $classID", __METHOD__ );
				}
            }

            return implode( ' OR ', $classQueryParts );
        }
        elseif ( (int)$contentClassIdent . '' == $contentClassIdent . '' )
        {
            return eZSolr::getMetaFieldName( 'contentclass_id' ) . ':' . $contentClassIdent;
        }
        elseif ( is_string( $contentClassIdent ) )
        {
            if ( $class = eZContentClass::fetchByIdentifier( $contentClassIdent ) )
            {
                return eZSolr::getMetaFieldName( 'contentclass_id' ) . ':' . $class->attribute( 'id' );
            }
        }

        eZDebug::writeError( 'No valid content class', __METHOD__ );

        return null;
    }
protected function getContentClassFilterQuery ( $ contentClassIdent ) { if ( empty ( $ contentClassIdent ) ) { return null ; } if ( is_array ( $ contentClassIdent ) ) { $ classQueryParts = array ( ) ; foreach ( $ contentClassIdent as $ classID ) { $ classID = trim ( $ classID ) ; if ( empty ( $ classID ) ) { continue ; } if ( ( int ) $ classID . '' == $ classID . '' ) { $ classQueryParts [ ] = eZSolr :: getMetaFieldName ( 'contentclass_id' ) . ':' . $ classID ; } elseif ( is_string ( $ classID ) ) { if ( $ class = eZContentClass :: fetchByIdentifier ( $ classID ) ) { $ classQueryParts [ ] = eZSolr :: getMetaFieldName ( 'contentclass_id' ) . ':' . $ class -> attribute ( 'id' ) ; } } else { eZDebug :: writeError ( "Unknown class_id filtering parameter: $classID" , __METHOD__ ) ; } } return implode ( ' OR ' , $ classQueryParts ) ; } elseif ( ( int ) $ contentClassIdent . '' == $ contentClassIdent . '' ) { return eZSolr :: getMetaFieldName ( 'contentclass_id' ) . ':' . $ contentClassIdent ; } elseif ( is_string ( $ contentClassIdent ) ) { if ( $ class = eZContentClass :: fetchByIdentifier ( $ contentClassIdent ) ) { return eZSolr :: getMetaFieldName ( 'contentclass_id' ) . ':' . $ class -> attribute ( 'id' ) ; } } eZDebug :: writeError ( 'No valid content class' , __METHOD__ ) ; return null ; }
Generate class query filter.

@param mixed $contentClassIdent eZContentClass id, identifier or list of ids.

@return string Content class query filter. Returns null if invalid
$contentClassIdent is provided.
Generate class query filter .