kernel/classes/ezcontentobjecttreenode.php
static function createExtendedAttributeFilterSQLStrings( &$extendedAttributeFilter )
    {
        $filter = array( 'tables'   => '',
                         'joins'    => '',
                         'columns'  => '',
                         'group_by' => '' );

        if ( $extendedAttributeFilter and count( $extendedAttributeFilter ) > 1 )
        {
            $extendedAttributeFilterID      = $extendedAttributeFilter['id'];
            $extendedAttributeFilterParams  = $extendedAttributeFilter['params'];
            $filterINI                      = eZINI::instance( 'extendedattributefilter.ini' );

            if ( !$filterINI->hasGroup( $extendedAttributeFilterID ) )
            {
                eZDebug::writeError( "Unable to find configuration for the extended attribute filter '$extendedAttributeFilterID', the filter will be ignored", __METHOD__ );
                return $filter;
            }

            $filterClassName    = $filterINI->variable( $extendedAttributeFilterID, 'ClassName' );
            $filterMethodName   = $filterINI->variable( $extendedAttributeFilterID, 'MethodName' );

            if ( $filterINI->hasVariable( $extendedAttributeFilterID, 'FileName' ) )
            {
                $filterFile = $filterINI->variable( $extendedAttributeFilterID, 'FileName' );

                if ( $filterINI->hasVariable( $extendedAttributeFilterID, 'ExtensionName' ) )
                {
                    $extensionName = $filterINI->variable( $extendedAttributeFilterID, 'ExtensionName' );
                    include_once( eZExtension::baseDirectory() . "/$extensionName/$filterFile" );
                }
                else
                {
                    include_once( $filterFile );
                }
            }

            if ( !class_exists( $filterClassName, true ) )
            {
                eZDebug::writeError( "Unable to find the PHP class '$filterClassName' associated with the extended attribute filter '$extendedAttributeFilterID', the filter will be ignored", __METHOD__ );
                return $filter;
            }

            $classObject        = new $filterClassName();
            $parameterArray     = array( $extendedAttributeFilterParams );

            $sqlResult          = call_user_func_array( array( $classObject, $filterMethodName ), $parameterArray );

            $filter['tables']   = $sqlResult['tables'];
            $filter['joins']    = $sqlResult['joins'];
            $filter['columns']  = isset( $sqlResult['columns'] ) ? $sqlResult['columns'] : '';

            if( isset( $sqlResult['group_by'] ) )
                $filter['group_by'] =  $sqlResult['group_by'];
        }

        return $filter;
    }
static function createExtendedAttributeFilterSQLStrings( &$extendedAttributeFilter )
    {
        $filter = array( 'tables'   => '',
                         'joins'    => '',
                         'columns'  => '',
                         'group_by' => '' );

        if ( $extendedAttributeFilter and count( $extendedAttributeFilter ) > 1 )
        {
            $extendedAttributeFilterID      = $extendedAttributeFilter['id'];
            $extendedAttributeFilterParams  = $extendedAttributeFilter['params'];
            $filterINI                      = eZINI::instance( 'extendedattributefilter.ini' );

            if ( !$filterINI->hasGroup( $extendedAttributeFilterID ) )
            {
                eZDebug::writeError( "Unable to find configuration for the extended attribute filter '$extendedAttributeFilterID', the filter will be ignored", __METHOD__ );
                return $filter;
            }

            $filterClassName    = $filterINI->variable( $extendedAttributeFilterID, 'ClassName' );
            $filterMethodName   = $filterINI->variable( $extendedAttributeFilterID, 'MethodName' );

            if ( $filterINI->hasVariable( $extendedAttributeFilterID, 'FileName' ) )
            {
                $filterFile = $filterINI->variable( $extendedAttributeFilterID, 'FileName' );

                if ( $filterINI->hasVariable( $extendedAttributeFilterID, 'ExtensionName' ) )
                {
                    $extensionName = $filterINI->variable( $extendedAttributeFilterID, 'ExtensionName' );
                    include_once( eZExtension::baseDirectory() . "/$extensionName/$filterFile" );
                }
                else
                {
                    include_once( $filterFile );
                }
            }

            if ( !class_exists( $filterClassName, true ) )
            {
                eZDebug::writeError( "Unable to find the PHP class '$filterClassName' associated with the extended attribute filter '$extendedAttributeFilterID', the filter will be ignored", __METHOD__ );
                return $filter;
            }

            $classObject        = new $filterClassName();
            $parameterArray     = array( $extendedAttributeFilterParams );

            $sqlResult          = call_user_func_array( array( $classObject, $filterMethodName ), $parameterArray );

            $filter['tables']   = $sqlResult['tables'];
            $filter['joins']    = $sqlResult['joins'];
            $filter['columns']  = isset( $sqlResult['columns'] ) ? $sqlResult['columns'] : '';

            if( isset( $sqlResult['group_by'] ) )
                $filter['group_by'] =  $sqlResult['group_by'];
        }

        return $filter;
    }
static function createExtendedAttributeFilterSQLStrings ( & $ extendedAttributeFilter ) { $ filter = array ( 'tables' => '' , 'joins' => '' , 'columns' => '' , 'group_by' => '' ) ; if ( $ extendedAttributeFilter and count ( $ extendedAttributeFilter ) > 1 ) { $ extendedAttributeFilterID = $ extendedAttributeFilter [ 'id' ] ; $ extendedAttributeFilterParams = $ extendedAttributeFilter [ 'params' ] ; $ filterINI = eZINI :: instance ( 'extendedattributefilter.ini' ) ; if ( ! $ filterINI -> hasGroup ( $ extendedAttributeFilterID ) ) { eZDebug :: writeError ( "Unable to find configuration for the extended attribute filter '$extendedAttributeFilterID', the filter will be ignored" , __METHOD__ ) ; return $ filter ; } $ filterClassName = $ filterINI -> variable ( $ extendedAttributeFilterID , 'ClassName' ) ; $ filterMethodName = $ filterINI -> variable ( $ extendedAttributeFilterID , 'MethodName' ) ; if ( $ filterINI -> hasVariable ( $ extendedAttributeFilterID , 'FileName' ) ) { $ filterFile = $ filterINI -> variable ( $ extendedAttributeFilterID , 'FileName' ) ; if ( $ filterINI -> hasVariable ( $ extendedAttributeFilterID , 'ExtensionName' ) ) { $ extensionName = $ filterINI -> variable ( $ extendedAttributeFilterID , 'ExtensionName' ) ; include_once ( eZExtension :: baseDirectory ( ) . "/$extensionName/$filterFile" ) ; } else { include_once ( $ filterFile ) ; } } if ( ! class_exists ( $ filterClassName , true ) ) { eZDebug :: writeError ( "Unable to find the PHP class '$filterClassName' associated with the extended attribute filter '$extendedAttributeFilterID', the filter will be ignored" , __METHOD__ ) ; return $ filter ; } $ classObject = new $ filterClassName ( ) ; $ parameterArray = array ( $ extendedAttributeFilterParams ) ; $ sqlResult = call_user_func_array ( array ( $ classObject , $ filterMethodName ) , $ parameterArray ) ; $ filter [ 'tables' ] = $ sqlResult [ 'tables' ] ; $ filter [ 'joins' ] = $ sqlResult [ 'joins' ] ; $ filter [ 'columns' ] = isset ( $ sqlResult [ 'columns' ] ) ? $ sqlResult [ 'columns' ] : '' ; if ( isset ( $ sqlResult [ 'group_by' ] ) ) $ filter [ 'group_by' ] = $ sqlResult [ 'group_by' ] ; } return $ filter ; }
Creates a filter array from extended attribute filters

The filter array includes tables, joins, columns and grouping information

@param array $extendedAttributeFilter
@return array
Creates a filter array from extended attribute filters