public function getService($block)
    {
        $blockType = ($block instanceof BlockInterface) ? $block->getBlockType() : $block;
        if (!isset($this->services[$blockType])) {
            throw new \Exception(sprintf("No BlockService available by the alias %s, available: %s", $blockType, implode(', ', array_keys($this->services))));
        }

        return $this->services[$blockType];
    }
public function getService($block)
    {
        $blockType = ($block instanceof BlockInterface) ? $block->getBlockType() : $block;
        if (!isset($this->services[$blockType])) {
            throw new \Exception(sprintf("No BlockService available by the alias %s, available: %s", $blockType, implode(', ', array_keys($this->services))));
        }

        return $this->services[$blockType];
    }
public function getService ( $ block ) { $ blockType = ( $ block instanceof BlockInterface ) ? $ block -> getBlockType ( ) : $ block ; if ( ! isset ( $ this -> services [ $ blockType ] ) ) { throw new \ Exception ( sprintf ( "No BlockService available by the alias %s, available: %s" , $ blockType , implode ( ', ' , array_keys ( $ this -> services ) ) ) ) ; } return $ this -> services [ $ blockType ] ; }
Returns the block service

@param string|BlockInterface  $block

@return BlockServiceInterface

@throws \Exception
Returns the block service