protected function validateInputFieldDefinitionCreateStruct(
        FieldDefinitionCreateStruct $fieldDefinitionCreateStruct,
        $argumentName = '$fieldDefinitionCreateStruct'
    ) {
        // Required properties

        if ($fieldDefinitionCreateStruct->fieldTypeIdentifier === null) {
            throw new InvalidArgumentException($argumentName, "Property 'fieldTypeIdentifier' is required");
        }

        if (!is_string($fieldDefinitionCreateStruct->fieldTypeIdentifier)) {
            throw new InvalidArgumentType(
                $argumentName . '->fieldTypeIdentifier',
                'string',
                $fieldDefinitionCreateStruct->fieldTypeIdentifier
            );
        }

        if ($fieldDefinitionCreateStruct->fieldTypeIdentifier === '') {
            throw new InvalidArgumentValue(
                $argumentName . '->fieldTypeIdentifier',
                $fieldDefinitionCreateStruct->fieldTypeIdentifier
            );
        }

        if ($fieldDefinitionCreateStruct->identifier === null) {
            throw new InvalidArgumentException($argumentName, "Property 'identifier' is required");
        }

        if (!is_string($fieldDefinitionCreateStruct->identifier)) {
            throw new InvalidArgumentType(
                $argumentName . '->identifier',
                'string',
                $fieldDefinitionCreateStruct->identifier
            );
        }

        if ($fieldDefinitionCreateStruct->identifier === '') {
            throw new InvalidArgumentValue(
                $argumentName . '->identifier',
                $fieldDefinitionCreateStruct->identifier
            );
        }

        // Optional properties

        if ($fieldDefinitionCreateStruct->names !== null) {
            $this->domainMapper->validateTranslatedList(
                $fieldDefinitionCreateStruct->names,
                $argumentName . '->names'
            );
        }

        if ($fieldDefinitionCreateStruct->descriptions !== null) {
            $this->domainMapper->validateTranslatedList(
                $fieldDefinitionCreateStruct->descriptions,
                $argumentName . '->descriptions'
            );
        }

        if ($fieldDefinitionCreateStruct->fieldGroup !== null && !is_string($fieldDefinitionCreateStruct->fieldGroup)) {
            throw new InvalidArgumentType(
                $argumentName . '->fieldGroup',
                'string',
                $fieldDefinitionCreateStruct->fieldGroup
            );
        }

        if ($fieldDefinitionCreateStruct->position !== null && !is_int($fieldDefinitionCreateStruct->position)) {
            throw new InvalidArgumentType(
                $argumentName . '->position',
                'integer',
                $fieldDefinitionCreateStruct->position
            );
        }

        if ($fieldDefinitionCreateStruct->isTranslatable !== null && !is_bool($fieldDefinitionCreateStruct->isTranslatable)) {
            throw new InvalidArgumentType(
                $argumentName . '->isTranslatable',
                'boolean',
                $fieldDefinitionCreateStruct->isTranslatable
            );
        }

        if ($fieldDefinitionCreateStruct->isRequired !== null && !is_bool($fieldDefinitionCreateStruct->isRequired)) {
            throw new InvalidArgumentType(
                $argumentName . '->isRequired',
                'boolean',
                $fieldDefinitionCreateStruct->isRequired
            );
        }

        if ($fieldDefinitionCreateStruct->isInfoCollector !== null && !is_bool($fieldDefinitionCreateStruct->isInfoCollector)) {
            throw new InvalidArgumentType(
                $argumentName . '->isInfoCollector',
                'boolean',
                $fieldDefinitionCreateStruct->isInfoCollector
            );
        }

        if ($fieldDefinitionCreateStruct->isSearchable !== null && !is_bool($fieldDefinitionCreateStruct->isSearchable)) {
            throw new InvalidArgumentType(
                $argumentName . '->isSearchable',
                'boolean',
                $fieldDefinitionCreateStruct->isSearchable
            );
        }

        // These properties are of type 'mixed' and are validated separately by the corresponding field type
        // validatorConfiguration
        // fieldSettings
        // defaultValue
    }
protected function validateInputFieldDefinitionCreateStruct(
        FieldDefinitionCreateStruct $fieldDefinitionCreateStruct,
        $argumentName = '$fieldDefinitionCreateStruct'
    ) {
        // Required properties

        if ($fieldDefinitionCreateStruct->fieldTypeIdentifier === null) {
            throw new InvalidArgumentException($argumentName, "Property 'fieldTypeIdentifier' is required");
        }

        if (!is_string($fieldDefinitionCreateStruct->fieldTypeIdentifier)) {
            throw new InvalidArgumentType(
                $argumentName . '->fieldTypeIdentifier',
                'string',
                $fieldDefinitionCreateStruct->fieldTypeIdentifier
            );
        }

        if ($fieldDefinitionCreateStruct->fieldTypeIdentifier === '') {
            throw new InvalidArgumentValue(
                $argumentName . '->fieldTypeIdentifier',
                $fieldDefinitionCreateStruct->fieldTypeIdentifier
            );
        }

        if ($fieldDefinitionCreateStruct->identifier === null) {
            throw new InvalidArgumentException($argumentName, "Property 'identifier' is required");
        }

        if (!is_string($fieldDefinitionCreateStruct->identifier)) {
            throw new InvalidArgumentType(
                $argumentName . '->identifier',
                'string',
                $fieldDefinitionCreateStruct->identifier
            );
        }

        if ($fieldDefinitionCreateStruct->identifier === '') {
            throw new InvalidArgumentValue(
                $argumentName . '->identifier',
                $fieldDefinitionCreateStruct->identifier
            );
        }

        // Optional properties

        if ($fieldDefinitionCreateStruct->names !== null) {
            $this->domainMapper->validateTranslatedList(
                $fieldDefinitionCreateStruct->names,
                $argumentName . '->names'
            );
        }

        if ($fieldDefinitionCreateStruct->descriptions !== null) {
            $this->domainMapper->validateTranslatedList(
                $fieldDefinitionCreateStruct->descriptions,
                $argumentName . '->descriptions'
            );
        }

        if ($fieldDefinitionCreateStruct->fieldGroup !== null && !is_string($fieldDefinitionCreateStruct->fieldGroup)) {
            throw new InvalidArgumentType(
                $argumentName . '->fieldGroup',
                'string',
                $fieldDefinitionCreateStruct->fieldGroup
            );
        }

        if ($fieldDefinitionCreateStruct->position !== null && !is_int($fieldDefinitionCreateStruct->position)) {
            throw new InvalidArgumentType(
                $argumentName . '->position',
                'integer',
                $fieldDefinitionCreateStruct->position
            );
        }

        if ($fieldDefinitionCreateStruct->isTranslatable !== null && !is_bool($fieldDefinitionCreateStruct->isTranslatable)) {
            throw new InvalidArgumentType(
                $argumentName . '->isTranslatable',
                'boolean',
                $fieldDefinitionCreateStruct->isTranslatable
            );
        }

        if ($fieldDefinitionCreateStruct->isRequired !== null && !is_bool($fieldDefinitionCreateStruct->isRequired)) {
            throw new InvalidArgumentType(
                $argumentName . '->isRequired',
                'boolean',
                $fieldDefinitionCreateStruct->isRequired
            );
        }

        if ($fieldDefinitionCreateStruct->isInfoCollector !== null && !is_bool($fieldDefinitionCreateStruct->isInfoCollector)) {
            throw new InvalidArgumentType(
                $argumentName . '->isInfoCollector',
                'boolean',
                $fieldDefinitionCreateStruct->isInfoCollector
            );
        }

        if ($fieldDefinitionCreateStruct->isSearchable !== null && !is_bool($fieldDefinitionCreateStruct->isSearchable)) {
            throw new InvalidArgumentType(
                $argumentName . '->isSearchable',
                'boolean',
                $fieldDefinitionCreateStruct->isSearchable
            );
        }

        // These properties are of type 'mixed' and are validated separately by the corresponding field type
        // validatorConfiguration
        // fieldSettings
        // defaultValue
    }
protected function validateInputFieldDefinitionCreateStruct ( FieldDefinitionCreateStruct $ fieldDefinitionCreateStruct , $ argumentName = '$fieldDefinitionCreateStruct' ) { // Required properties if ( $ fieldDefinitionCreateStruct -> fieldTypeIdentifier === null ) { throw new InvalidArgumentException ( $ argumentName , "Property 'fieldTypeIdentifier' is required" ) ; } if ( ! is_string ( $ fieldDefinitionCreateStruct -> fieldTypeIdentifier ) ) { throw new InvalidArgumentType ( $ argumentName . '->fieldTypeIdentifier' , 'string' , $ fieldDefinitionCreateStruct -> fieldTypeIdentifier ) ; } if ( $ fieldDefinitionCreateStruct -> fieldTypeIdentifier === '' ) { throw new InvalidArgumentValue ( $ argumentName . '->fieldTypeIdentifier' , $ fieldDefinitionCreateStruct -> fieldTypeIdentifier ) ; } if ( $ fieldDefinitionCreateStruct -> identifier === null ) { throw new InvalidArgumentException ( $ argumentName , "Property 'identifier' is required" ) ; } if ( ! is_string ( $ fieldDefinitionCreateStruct -> identifier ) ) { throw new InvalidArgumentType ( $ argumentName . '->identifier' , 'string' , $ fieldDefinitionCreateStruct -> identifier ) ; } if ( $ fieldDefinitionCreateStruct -> identifier === '' ) { throw new InvalidArgumentValue ( $ argumentName . '->identifier' , $ fieldDefinitionCreateStruct -> identifier ) ; } // Optional properties if ( $ fieldDefinitionCreateStruct -> names !== null ) { $ this -> domainMapper -> validateTranslatedList ( $ fieldDefinitionCreateStruct -> names , $ argumentName . '->names' ) ; } if ( $ fieldDefinitionCreateStruct -> descriptions !== null ) { $ this -> domainMapper -> validateTranslatedList ( $ fieldDefinitionCreateStruct -> descriptions , $ argumentName . '->descriptions' ) ; } if ( $ fieldDefinitionCreateStruct -> fieldGroup !== null && ! is_string ( $ fieldDefinitionCreateStruct -> fieldGroup ) ) { throw new InvalidArgumentType ( $ argumentName . '->fieldGroup' , 'string' , $ fieldDefinitionCreateStruct -> fieldGroup ) ; } if ( $ fieldDefinitionCreateStruct -> position !== null && ! is_int ( $ fieldDefinitionCreateStruct -> position ) ) { throw new InvalidArgumentType ( $ argumentName . '->position' , 'integer' , $ fieldDefinitionCreateStruct -> position ) ; } if ( $ fieldDefinitionCreateStruct -> isTranslatable !== null && ! is_bool ( $ fieldDefinitionCreateStruct -> isTranslatable ) ) { throw new InvalidArgumentType ( $ argumentName . '->isTranslatable' , 'boolean' , $ fieldDefinitionCreateStruct -> isTranslatable ) ; } if ( $ fieldDefinitionCreateStruct -> isRequired !== null && ! is_bool ( $ fieldDefinitionCreateStruct -> isRequired ) ) { throw new InvalidArgumentType ( $ argumentName . '->isRequired' , 'boolean' , $ fieldDefinitionCreateStruct -> isRequired ) ; } if ( $ fieldDefinitionCreateStruct -> isInfoCollector !== null && ! is_bool ( $ fieldDefinitionCreateStruct -> isInfoCollector ) ) { throw new InvalidArgumentType ( $ argumentName . '->isInfoCollector' , 'boolean' , $ fieldDefinitionCreateStruct -> isInfoCollector ) ; } if ( $ fieldDefinitionCreateStruct -> isSearchable !== null && ! is_bool ( $ fieldDefinitionCreateStruct -> isSearchable ) ) { throw new InvalidArgumentType ( $ argumentName . '->isSearchable' , 'boolean' , $ fieldDefinitionCreateStruct -> isSearchable ) ; } // These properties are of type 'mixed' and are validated separately by the corresponding field type // validatorConfiguration // fieldSettings // defaultValue }
Validates input FieldDefinitionCreateStruct.

@throws \eZ\Publish\Core\Base\Exceptions\InvalidArgumentException
@throws \eZ\Publish\Core\Base\Exceptions\InvalidArgumentType
@throws \eZ\Publish\Core\Base\Exceptions\InvalidArgumentValue

@param FieldDefinitionCreateStruct $fieldDefinitionCreateStruct
@param string $argumentName
Validates input FieldDefinitionCreateStruct .