Is the blockhandle protected in 9.0.2?

This code does not work anymore since updating to 9.0.2. The error is Cannot access protected property Concrete\Core\Block\Block::$btHandle. How to get the block type?

$c = \Page::getCurrentPage();
$blocks = $c->getBlocks(); //Retrieving all Blocks Objects on a Page.

foreach ($blocks as $b) {

if($b->btHandle === ‘film_blok_homepage’){
// code
}

}

?>

$b->getBlockTypeHandle();

2 Likes

Great that works, thanks!