src/Blocks/BlockContentTemplate.php
public function changeLineType(DataObjectInterface $dataObject)
    {
        $max = $dataObject->count();
        $delimiterFound = 0;

        $blockContent = [];

        for ($i = $this->lineNumber; $i < $max; $i++) {
            $currentLine = $dataObject->getLine($i);
            $lineContent = $currentLine->getContent();

            $this->createSkipLine($dataObject, $i);

            if ($this->isBlockDelimiterLine($lineContent)) {
                $this->setContentBlockKeyByContent($lineContent);
                $delimiterFound++;

                continue;
            }

            if ($delimiterFound > 1) {
                break;
            }

            $blockContent[] = $lineContent;
        }

        $content = $this->getSubBlockParsedContent($blockContent);

        $dataObject->saveAvailableBlock($this->contentBlockKey, $content);
    }
public function changeLineType(DataObjectInterface $dataObject)
    {
        $max = $dataObject->count();
        $delimiterFound = 0;

        $blockContent = [];

        for ($i = $this->lineNumber; $i < $max; $i++) {
            $currentLine = $dataObject->getLine($i);
            $lineContent = $currentLine->getContent();

            $this->createSkipLine($dataObject, $i);

            if ($this->isBlockDelimiterLine($lineContent)) {
                $this->setContentBlockKeyByContent($lineContent);
                $delimiterFound++;

                continue;
            }

            if ($delimiterFound > 1) {
                break;
            }

            $blockContent[] = $lineContent;
        }

        $content = $this->getSubBlockParsedContent($blockContent);

        $dataObject->saveAvailableBlock($this->contentBlockKey, $content);
    }
@param DataObjectInterface $dataObject

@throws \Exception