extension/ezjscore/classes/ajaxuploader/ezprelationlistajaxuploader.php
public function getContentClass( array $mimeData )
    {
        $upload = new eZContentUpload();

        $classIdentifier = $upload->detectClassIdentifier( $mimeData['name'] );
        $class = eZContentClass::fetchByIdentifier( $classIdentifier );
        if ( !$class instanceof eZContentClass )
        {
            throw new RuntimeException(
                ezpI18n::tr(
                    'extension/ezjscore/ajaxuploader',
                    'Unable to load the class which identifier is "%class",' .
                    ' this is probably a configuration issue in upload.ini.',
                    null, array( '%class' => $classIdentifier )
                )
            );
        }

        $classContent = $this->attribute->attribute( 'class_content' );

        if ( !empty( $classContent['class_constraint_list'] )
                && !in_array( $classIdentifier, $classContent['class_constraint_list'] ) )
        {
            throw new DomainException(
                ezpI18n::tr(
                    'extension/ezjscore/ajaxuploader', 'The file cannot be processed because' .
                    ' it would result in a \'%class\' object and this relation' .
                    ' does not accept this type of object.',
                    null, array( '%class' => $class->attribute( 'name' ) )
                )
            );
        }
        return $class;
    }
public function getContentClass( array $mimeData )
    {
        $upload = new eZContentUpload();

        $classIdentifier = $upload->detectClassIdentifier( $mimeData['name'] );
        $class = eZContentClass::fetchByIdentifier( $classIdentifier );
        if ( !$class instanceof eZContentClass )
        {
            throw new RuntimeException(
                ezpI18n::tr(
                    'extension/ezjscore/ajaxuploader',
                    'Unable to load the class which identifier is "%class",' .
                    ' this is probably a configuration issue in upload.ini.',
                    null, array( '%class' => $classIdentifier )
                )
            );
        }

        $classContent = $this->attribute->attribute( 'class_content' );

        if ( !empty( $classContent['class_constraint_list'] )
                && !in_array( $classIdentifier, $classContent['class_constraint_list'] ) )
        {
            throw new DomainException(
                ezpI18n::tr(
                    'extension/ezjscore/ajaxuploader', 'The file cannot be processed because' .
                    ' it would result in a \'%class\' object and this relation' .
                    ' does not accept this type of object.',
                    null, array( '%class' => $class->attribute( 'name' ) )
                )
            );
        }
        return $class;
    }
public function getContentClass ( array $ mimeData ) { $ upload = new eZContentUpload ( ) ; $ classIdentifier = $ upload -> detectClassIdentifier ( $ mimeData [ 'name' ] ) ; $ class = eZContentClass :: fetchByIdentifier ( $ classIdentifier ) ; if ( ! $ class instanceof eZContentClass ) { throw new RuntimeException ( ezpI18n :: tr ( 'extension/ezjscore/ajaxuploader' , 'Unable to load the class which identifier is "%class",' . ' this is probably a configuration issue in upload.ini.' , null , array ( '%class' => $ classIdentifier ) ) ) ; } $ classContent = $ this -> attribute -> attribute ( 'class_content' ) ; if ( ! empty ( $ classContent [ 'class_constraint_list' ] ) && ! in_array ( $ classIdentifier , $ classContent [ 'class_constraint_list' ] ) ) { throw new DomainException ( ezpI18n :: tr ( 'extension/ezjscore/ajaxuploader' , 'The file cannot be processed because' . ' it would result in a \'%class\' object and this relation' . ' does not accept this type of object.' , null , array ( '%class' => $ class -> attribute ( 'name' ) ) ) ) ; } return $ class ; }
Returns the content class to use when creating the content object from
the file

@param array $mimeData
@return eZContentClass
@throw RuntimeException if the found class identifier does not exists
@throw DomainException if objects of the found class are not allowed
Returns the content class to use when creating the content object from the file