lib/Core/StructBuilder/BlockStructBuilder.php
public function newBlockUpdateStruct(string $locale, ?Block $block = null): BlockUpdateStruct
    {
        $blockUpdateStruct = new BlockUpdateStruct();
        $blockUpdateStruct->locale = $locale;

        if (!$block instanceof Block) {
            return $blockUpdateStruct;
        }

        $blockUpdateStruct->viewType = $block->getViewType();
        $blockUpdateStruct->itemViewType = $block->getItemViewType();
        $blockUpdateStruct->name = $block->getName();
        $blockUpdateStruct->alwaysAvailable = $block->isAlwaysAvailable();
        $blockUpdateStruct->fillParametersFromBlock($block);

        $this->configStructBuilder->buildConfigUpdateStructs($block, $blockUpdateStruct);

        return $blockUpdateStruct;
    }
public function newBlockUpdateStruct(string $locale, ?Block $block = null): BlockUpdateStruct
    {
        $blockUpdateStruct = new BlockUpdateStruct();
        $blockUpdateStruct->locale = $locale;

        if (!$block instanceof Block) {
            return $blockUpdateStruct;
        }

        $blockUpdateStruct->viewType = $block->getViewType();
        $blockUpdateStruct->itemViewType = $block->getItemViewType();
        $blockUpdateStruct->name = $block->getName();
        $blockUpdateStruct->alwaysAvailable = $block->isAlwaysAvailable();
        $blockUpdateStruct->fillParametersFromBlock($block);

        $this->configStructBuilder->buildConfigUpdateStructs($block, $blockUpdateStruct);

        return $blockUpdateStruct;
    }
public function newBlockUpdateStruct ( string $ locale , ? Block $ block = null ) : BlockUpdateStruct { $ blockUpdateStruct = new BlockUpdateStruct ( ) ; $ blockUpdateStruct -> locale = $ locale ; if ( ! $ block instanceof Block ) { return $ blockUpdateStruct ; } $ blockUpdateStruct -> viewType = $ block -> getViewType ( ) ; $ blockUpdateStruct -> itemViewType = $ block -> getItemViewType ( ) ; $ blockUpdateStruct -> name = $ block -> getName ( ) ; $ blockUpdateStruct -> alwaysAvailable = $ block -> isAlwaysAvailable ( ) ; $ blockUpdateStruct -> fillParametersFromBlock ( $ block ) ; $ this -> configStructBuilder -> buildConfigUpdateStructs ( $ block , $ blockUpdateStruct ) ; return $ blockUpdateStruct ; }
Creates a new block update struct in specified locale.

If block is provided, initial data is copied from the block.
Creates a new block update struct in specified locale .