public function getBlockRenderer(BlockInterface $block)
    {
        $type = $block->getType();

        $name = isset($this->blockRenderers[$type]) ? $this->blockRenderers[$type] : $this->defaultRenderer;
        $service = $this->getRendererService($name);

        if (!$service instanceof RendererInterface) {
            throw new \RuntimeException(sprintf('The service "%s" is not an exception renderer', $name));
        }

        return $service;
    }
public function getBlockRenderer(BlockInterface $block)
    {
        $type = $block->getType();

        $name = isset($this->blockRenderers[$type]) ? $this->blockRenderers[$type] : $this->defaultRenderer;
        $service = $this->getRendererService($name);

        if (!$service instanceof RendererInterface) {
            throw new \RuntimeException(sprintf('The service "%s" is not an exception renderer', $name));
        }

        return $service;
    }
public function getBlockRenderer ( BlockInterface $ block ) { $ type = $ block -> getType ( ) ; $ name = isset ( $ this -> blockRenderers [ $ type ] ) ? $ this -> blockRenderers [ $ type ] : $ this -> defaultRenderer ; $ service = $ this -> getRendererService ( $ name ) ; if ( ! $ service instanceof RendererInterface ) { throw new \ RuntimeException ( sprintf ( 'The service "%s" is not an exception renderer' , $ name ) ) ; } return $ service ; }
Returns the exception renderer for given block.

@param BlockInterface $block

@throws \RuntimeException

@return RendererInterface
Returns the exception renderer for given block .