public function addBlockType($type, $tag, $continuable = false, $completable = false, $index = null)
    {
        $block = &$this->unmarkedBlockTypes;
        if ($type) {
            if (!isset($this->BlockTypes[$type])) {
                $this->BlockTypes[$type] = [];
            }
            $block = &$this->BlockTypes[$type];
        }

        if (null === $index) {
            $block[] = $tag;
        } else {
            array_splice($block, $index, 0, [$tag]);
        }

        if ($continuable) {
            $this->continuable_blocks[] = $tag;
        }
        if ($completable) {
            $this->completable_blocks[] = $tag;
        }
    }
public function addBlockType($type, $tag, $continuable = false, $completable = false, $index = null)
    {
        $block = &$this->unmarkedBlockTypes;
        if ($type) {
            if (!isset($this->BlockTypes[$type])) {
                $this->BlockTypes[$type] = [];
            }
            $block = &$this->BlockTypes[$type];
        }

        if (null === $index) {
            $block[] = $tag;
        } else {
            array_splice($block, $index, 0, [$tag]);
        }

        if ($continuable) {
            $this->continuable_blocks[] = $tag;
        }
        if ($completable) {
            $this->completable_blocks[] = $tag;
        }
    }
public function addBlockType ( $ type , $ tag , $ continuable = false , $ completable = false , $ index = null ) { $ block = & $ this -> unmarkedBlockTypes ; if ( $ type ) { if ( ! isset ( $ this -> BlockTypes [ $ type ] ) ) { $ this -> BlockTypes [ $ type ] = [ ] ; } $ block = & $ this -> BlockTypes [ $ type ] ; } if ( null === $ index ) { $ block [ ] = $ tag ; } else { array_splice ( $ block , $ index , 0 , [ $ tag ] ) ; } if ( $ continuable ) { $ this -> continuable_blocks [ ] = $ tag ; } if ( $ completable ) { $ this -> completable_blocks [ ] = $ tag ; } }
Be able to define a new Block type or override an existing one

@param string $type
@param string $tag
@param bool $continuable
@param bool $completable
@param int|null $index
Be able to define a new Block type or override an existing one