lib/Core/StructBuilder/BlockStructBuilder.php
public function newBlockCreateStruct(BlockDefinitionInterface $blockDefinition): BlockCreateStruct
    {
        $viewTypeIdentifier = $blockDefinition->getViewTypeIdentifiers()[0];
        $viewType = $blockDefinition->getViewType($viewTypeIdentifier);
        $itemViewTypeIdentifier = $viewType->getItemViewTypeIdentifiers()[0];

        $blockCreateStruct = new BlockCreateStruct($blockDefinition);
        $blockCreateStruct->viewType = $viewTypeIdentifier;
        $blockCreateStruct->itemViewType = $itemViewTypeIdentifier;
        $blockCreateStruct->isTranslatable = $blockDefinition->isTranslatable();
        $blockCreateStruct->alwaysAvailable = true;

        return $blockCreateStruct;
    }
public function newBlockCreateStruct(BlockDefinitionInterface $blockDefinition): BlockCreateStruct
    {
        $viewTypeIdentifier = $blockDefinition->getViewTypeIdentifiers()[0];
        $viewType = $blockDefinition->getViewType($viewTypeIdentifier);
        $itemViewTypeIdentifier = $viewType->getItemViewTypeIdentifiers()[0];

        $blockCreateStruct = new BlockCreateStruct($blockDefinition);
        $blockCreateStruct->viewType = $viewTypeIdentifier;
        $blockCreateStruct->itemViewType = $itemViewTypeIdentifier;
        $blockCreateStruct->isTranslatable = $blockDefinition->isTranslatable();
        $blockCreateStruct->alwaysAvailable = true;

        return $blockCreateStruct;
    }
public function newBlockCreateStruct ( BlockDefinitionInterface $ blockDefinition ) : BlockCreateStruct { $ viewTypeIdentifier = $ blockDefinition -> getViewTypeIdentifiers ( ) [ 0 ] ; $ viewType = $ blockDefinition -> getViewType ( $ viewTypeIdentifier ) ; $ itemViewTypeIdentifier = $ viewType -> getItemViewTypeIdentifiers ( ) [ 0 ] ; $ blockCreateStruct = new BlockCreateStruct ( $ blockDefinition ) ; $ blockCreateStruct -> viewType = $ viewTypeIdentifier ; $ blockCreateStruct -> itemViewType = $ itemViewTypeIdentifier ; $ blockCreateStruct -> isTranslatable = $ blockDefinition -> isTranslatable ( ) ; $ blockCreateStruct -> alwaysAvailable = true ; return $ blockCreateStruct ; }
Creates a new block create struct from data found in provided block definition.
Creates a new block create struct from data found in provided block definition .