lib/Core/Validator/BlockValidator.php
public function validateBlockCreateStruct(BlockCreateStruct $blockCreateStruct): void
    {
        $this->validate(
            $blockCreateStruct,
            [
                new BlockCreateStructConstraint(),
            ]
        );

        $this->validate(
            $blockCreateStruct,
            new ConfigAwareStructConstraint(
                [
                    'payload' => $blockCreateStruct->getDefinition(),
                ]
            )
        );

        $collectionCreateStructs = $blockCreateStruct->getCollectionCreateStructs();
        if (count($collectionCreateStructs) > 0) {
            foreach ($collectionCreateStructs as $collectionCreateStruct) {
                $this->collectionValidator->validateCollectionCreateStruct($collectionCreateStruct);
            }
        }
    }
public function validateBlockCreateStruct(BlockCreateStruct $blockCreateStruct): void
    {
        $this->validate(
            $blockCreateStruct,
            [
                new BlockCreateStructConstraint(),
            ]
        );

        $this->validate(
            $blockCreateStruct,
            new ConfigAwareStructConstraint(
                [
                    'payload' => $blockCreateStruct->getDefinition(),
                ]
            )
        );

        $collectionCreateStructs = $blockCreateStruct->getCollectionCreateStructs();
        if (count($collectionCreateStructs) > 0) {
            foreach ($collectionCreateStructs as $collectionCreateStruct) {
                $this->collectionValidator->validateCollectionCreateStruct($collectionCreateStruct);
            }
        }
    }
public function validateBlockCreateStruct ( BlockCreateStruct $ blockCreateStruct ) : void { $ this -> validate ( $ blockCreateStruct , [ new BlockCreateStructConstraint ( ) , ] ) ; $ this -> validate ( $ blockCreateStruct , new ConfigAwareStructConstraint ( [ 'payload' => $ blockCreateStruct -> getDefinition ( ) , ] ) ) ; $ collectionCreateStructs = $ blockCreateStruct -> getCollectionCreateStructs ( ) ; if ( count ( $ collectionCreateStructs ) > 0 ) { foreach ( $ collectionCreateStructs as $ collectionCreateStruct ) { $ this -> collectionValidator -> validateCollectionCreateStruct ( $ collectionCreateStruct ) ; } } }
Validates the provided block create struct.

@throws \Netgen\BlockManager\Exception\Validation\ValidationException If the validation failed
Validates the provided block create struct .