public function validateClassAttributeHTTPInput( $http, $base, $attribute )
    {
        $classAttributeID = $attribute->attribute( 'id' );

        $maxTags = trim( $http->postVariable( $base . self::MAX_TAGS_VARIABLE . $classAttributeID, '' ) );
        if ( ( !is_numeric( $maxTags ) && !empty( $maxTags ) ) || (int) $maxTags < 0 )
            return eZInputValidator::STATE_INVALID;

        $subTreeLimit = (int) $http->postVariable( $base . self::SUBTREE_LIMIT_VARIABLE . $classAttributeID, -1 );
        if ( $subTreeLimit < 0 )
            return eZInputValidator::STATE_INVALID;

        if ( $subTreeLimit > 0 )
        {
            $tag = eZTagsObject::fetchWithMainTranslation( $subTreeLimit );
            if ( !$tag instanceof eZTagsObject || $tag->attribute( 'main_tag_id' ) > 0 )
                return eZInputValidator::STATE_INVALID;
        }

        return eZInputValidator::STATE_ACCEPTED;
    }
public function validateClassAttributeHTTPInput( $http, $base, $attribute )
    {
        $classAttributeID = $attribute->attribute( 'id' );

        $maxTags = trim( $http->postVariable( $base . self::MAX_TAGS_VARIABLE . $classAttributeID, '' ) );
        if ( ( !is_numeric( $maxTags ) && !empty( $maxTags ) ) || (int) $maxTags < 0 )
            return eZInputValidator::STATE_INVALID;

        $subTreeLimit = (int) $http->postVariable( $base . self::SUBTREE_LIMIT_VARIABLE . $classAttributeID, -1 );
        if ( $subTreeLimit < 0 )
            return eZInputValidator::STATE_INVALID;

        if ( $subTreeLimit > 0 )
        {
            $tag = eZTagsObject::fetchWithMainTranslation( $subTreeLimit );
            if ( !$tag instanceof eZTagsObject || $tag->attribute( 'main_tag_id' ) > 0 )
                return eZInputValidator::STATE_INVALID;
        }

        return eZInputValidator::STATE_ACCEPTED;
    }
public function validateClassAttributeHTTPInput ( $ http , $ base , $ attribute ) { $ classAttributeID = $ attribute -> attribute ( 'id' ) ; $ maxTags = trim ( $ http -> postVariable ( $ base . self :: MAX_TAGS_VARIABLE . $ classAttributeID , '' ) ) ; if ( ( ! is_numeric ( $ maxTags ) && ! empty ( $ maxTags ) ) || ( int ) $ maxTags < 0 ) return eZInputValidator :: STATE_INVALID ; $ subTreeLimit = ( int ) $ http -> postVariable ( $ base . self :: SUBTREE_LIMIT_VARIABLE . $ classAttributeID , - 1 ) ; if ( $ subTreeLimit < 0 ) return eZInputValidator :: STATE_INVALID ; if ( $ subTreeLimit > 0 ) { $ tag = eZTagsObject :: fetchWithMainTranslation ( $ subTreeLimit ) ; if ( ! $ tag instanceof eZTagsObject || $ tag -> attribute ( 'main_tag_id' ) > 0 ) return eZInputValidator :: STATE_INVALID ; } return eZInputValidator :: STATE_ACCEPTED ; }
Validates class attribute HTTP input

@param eZHTTPTool $http
@param string $base
@param eZContentClassAttribute $attribute

@return bool
Validates class attribute HTTP input