kernel/classes/ezcontentobjecttreenode.php
static function createClassFilteringSQLString( $classFilterType, &$classFilterArray )
    {
        // Check for class filtering
        $classCondition = '';

        if ( isset( $classFilterType ) &&
             ( $classFilterType == 'include' || $classFilterType == 'exclude' ) &&
             count( $classFilterArray ) > 0 )
        {
            $classCondition = '  ';
            $i = 0;
            $classCount = count( $classFilterArray );
            $classIDArray = array();
            foreach ( $classFilterArray as $classID )
            {
                $originalClassID = $classID;
                // Check if classes are recerenced by identifier
                if ( is_string( $classID ) && !is_numeric( $classID ) )
                {
                    $classID = eZContentClass::classIDByIdentifier( $classID );
                }
                if ( is_numeric( $classID ) )
                {
                    $classIDArray[] = $classID;
                }
                else
                {
                    eZDebugSetting::writeWarning( 'kernel-content-class', "Invalid class identifier in subTree() classfilterarray, classID : " . $originalClassID );
                }
            }

            if ( count( $classIDArray ) > 0  )
            {
                $classCondition .= " ezcontentobject.contentclass_id ";
                if ( $classFilterType == 'include' )
                    $classCondition .= " IN ";
                else
                    $classCondition .= " NOT IN ";

                $classIDString =  implode( ', ', $classIDArray );
                $classCondition .= ' ( ' . $classIDString . ' ) AND';
            }
            else
            {
                if ( count( $classIDArray ) == 0 and count( $classFilterArray ) > 0 and $classFilterType == 'include' )
                {
                    $classCondition = false;
                }
            }
        }

        return $classCondition;
    }
static function createClassFilteringSQLString( $classFilterType, &$classFilterArray )
    {
        // Check for class filtering
        $classCondition = '';

        if ( isset( $classFilterType ) &&
             ( $classFilterType == 'include' || $classFilterType == 'exclude' ) &&
             count( $classFilterArray ) > 0 )
        {
            $classCondition = '  ';
            $i = 0;
            $classCount = count( $classFilterArray );
            $classIDArray = array();
            foreach ( $classFilterArray as $classID )
            {
                $originalClassID = $classID;
                // Check if classes are recerenced by identifier
                if ( is_string( $classID ) && !is_numeric( $classID ) )
                {
                    $classID = eZContentClass::classIDByIdentifier( $classID );
                }
                if ( is_numeric( $classID ) )
                {
                    $classIDArray[] = $classID;
                }
                else
                {
                    eZDebugSetting::writeWarning( 'kernel-content-class', "Invalid class identifier in subTree() classfilterarray, classID : " . $originalClassID );
                }
            }

            if ( count( $classIDArray ) > 0  )
            {
                $classCondition .= " ezcontentobject.contentclass_id ";
                if ( $classFilterType == 'include' )
                    $classCondition .= " IN ";
                else
                    $classCondition .= " NOT IN ";

                $classIDString =  implode( ', ', $classIDArray );
                $classCondition .= ' ( ' . $classIDString . ' ) AND';
            }
            else
            {
                if ( count( $classIDArray ) == 0 and count( $classFilterArray ) > 0 and $classFilterType == 'include' )
                {
                    $classCondition = false;
                }
            }
        }

        return $classCondition;
    }
static function createClassFilteringSQLString ( $ classFilterType , & $ classFilterArray ) { // Check for class filtering $ classCondition = '' ; if ( isset ( $ classFilterType ) && ( $ classFilterType == 'include' || $ classFilterType == 'exclude' ) && count ( $ classFilterArray ) > 0 ) { $ classCondition = '  ' ; $ i = 0 ; $ classCount = count ( $ classFilterArray ) ; $ classIDArray = array ( ) ; foreach ( $ classFilterArray as $ classID ) { $ originalClassID = $ classID ; // Check if classes are recerenced by identifier if ( is_string ( $ classID ) && ! is_numeric ( $ classID ) ) { $ classID = eZContentClass :: classIDByIdentifier ( $ classID ) ; } if ( is_numeric ( $ classID ) ) { $ classIDArray [ ] = $ classID ; } else { eZDebugSetting :: writeWarning ( 'kernel-content-class' , "Invalid class identifier in subTree() classfilterarray, classID : " . $ originalClassID ) ; } } if ( count ( $ classIDArray ) > 0 ) { $ classCondition .= " ezcontentobject.contentclass_id " ; if ( $ classFilterType == 'include' ) $ classCondition .= " IN " ; else $ classCondition .= " NOT IN " ; $ classIDString = implode ( ', ' , $ classIDArray ) ; $ classCondition .= ' ( ' . $ classIDString . ' ) AND' ; } else { if ( count ( $ classIDArray ) == 0 and count ( $ classFilterArray ) > 0 and $ classFilterType == 'include' ) { $ classCondition = false ; } } } return $ classCondition ; }
Returns an SQL string to filter query results by classes

@param string|bool $classFilterType
@param array $classFilterArray
@return string|bool
Returns an SQL string to filter query results by classes