src/Model/Page.php
public function getBlocksByType($type)
    {
        $blocks = [];

        foreach ($this->getBlocks() as $block) {
            if ($type === $block->getType()) {
                $blocks[] = $block;
            }
        }

        return $blocks;
    }
public function getBlocksByType($type)
    {
        $blocks = [];

        foreach ($this->getBlocks() as $block) {
            if ($type === $block->getType()) {
                $blocks[] = $block;
            }
        }

        return $blocks;
    }
public function getBlocksByType ( $ type ) { $ blocks = [ ] ; foreach ( $ this -> getBlocks ( ) as $ block ) { if ( $ type === $ block -> getType ( ) ) { $ blocks [ ] = $ block ; } } return $ blocks ; }
Retrieve blocks by type.

@param string $type

@return array
Retrieve blocks by type .