Util/BlockUtils.php
public static function registerPlugin(BlockView $view, $pluginName)
    {
        $optionsArray = $view->vars['block_prefixes'];
        array_splice(
            $optionsArray,
            -1,
            1,
            [$pluginName, end($optionsArray)]
        );
        $view->vars['block_prefixes'] = $optionsArray;
    }
public static function registerPlugin(BlockView $view, $pluginName)
    {
        $optionsArray = $view->vars['block_prefixes'];
        array_splice(
            $optionsArray,
            -1,
            1,
            [$pluginName, end($optionsArray)]
        );
        $view->vars['block_prefixes'] = $optionsArray;
    }
public static function registerPlugin ( BlockView $ view , $ pluginName ) { $ optionsArray = $ view -> vars [ 'block_prefixes' ] ; array_splice ( $ optionsArray , - 1 , 1 , [ $ pluginName , end ( $ optionsArray ) ] ) ; $ view -> vars [ 'block_prefixes' ] = $ optionsArray ; }
Registers the plugin for the block type.
You can use this method to add the additional block prefix that allow you
to create an additional template for existing block type.

IMPORTANT: This method should be called in finishView of your block type extension
because the 'block_prefixes' array is not filled in buildView yet.

@param BlockView $view
@param string    $pluginName
Registers the plugin for the block type . You can use this method to add the additional block prefix that allow you to create an additional template for existing block type .