private function isAllowed($blockId, ModelInterface $block)
    {
        $result = $this->getEventManager()->trigger(
            __FUNCTION__,
            $this,
            [
                'block_id' => $blockId,
                'block' => $block
            ]
        );
        if ($result->stopped()) {
            return $result->last();
        }
        return true;
    }
private function isAllowed($blockId, ModelInterface $block)
    {
        $result = $this->getEventManager()->trigger(
            __FUNCTION__,
            $this,
            [
                'block_id' => $blockId,
                'block' => $block
            ]
        );
        if ($result->stopped()) {
            return $result->last();
        }
        return true;
    }
private function isAllowed ( $ blockId , ModelInterface $ block ) { $ result = $ this -> getEventManager ( ) -> trigger ( __FUNCTION__ , $ this , [ 'block_id' => $ blockId , 'block' => $ block ] ) ; if ( $ result -> stopped ( ) ) { return $ result -> last ( ) ; } return true ; }
Determines whether a block should be allowed given certain parameters

@param   string          $blockId
@param   ModelInterface  $block
@return  bool
Determines whether a block should be allowed given certain parameters