lib/Core/Validator/LayoutValidator.php
public function validateLayoutUpdateStruct(LayoutUpdateStruct $layoutUpdateStruct): void
    {
        $layoutName = is_string($layoutUpdateStruct->name) ?
            trim($layoutUpdateStruct->name) :
            $layoutUpdateStruct->name;

        if ($layoutName !== null) {
            $this->validate(
                $layoutName,
                [
                    new Constraints\NotBlank(),
                    new Constraints\Type(['type' => 'string']),
                ],
                'name'
            );
        }

        if ($layoutUpdateStruct->description !== null) {
            $this->validate(
                $layoutUpdateStruct->description,
                [
                    new Constraints\Type(['type' => 'string']),
                ],
                'description'
            );
        }
    }
public function validateLayoutUpdateStruct(LayoutUpdateStruct $layoutUpdateStruct): void
    {
        $layoutName = is_string($layoutUpdateStruct->name) ?
            trim($layoutUpdateStruct->name) :
            $layoutUpdateStruct->name;

        if ($layoutName !== null) {
            $this->validate(
                $layoutName,
                [
                    new Constraints\NotBlank(),
                    new Constraints\Type(['type' => 'string']),
                ],
                'name'
            );
        }

        if ($layoutUpdateStruct->description !== null) {
            $this->validate(
                $layoutUpdateStruct->description,
                [
                    new Constraints\Type(['type' => 'string']),
                ],
                'description'
            );
        }
    }
public function validateLayoutUpdateStruct ( LayoutUpdateStruct $ layoutUpdateStruct ) : void { $ layoutName = is_string ( $ layoutUpdateStruct -> name ) ? trim ( $ layoutUpdateStruct -> name ) : $ layoutUpdateStruct -> name ; if ( $ layoutName !== null ) { $ this -> validate ( $ layoutName , [ new Constraints \ NotBlank ( ) , new Constraints \ Type ( [ 'type' => 'string' ] ) , ] , 'name' ) ; } if ( $ layoutUpdateStruct -> description !== null ) { $ this -> validate ( $ layoutUpdateStruct -> description , [ new Constraints \ Type ( [ 'type' => 'string' ] ) , ] , 'description' ) ; } }
Validates the provided layout update struct.

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