public function actionToggleBlockHidden($blockId, $hiddenState)
    {
        $block = NavItemPageBlockItem::findOne($blockId);
        if ($block) {
            $block->is_hidden = $hiddenState;
            return $block->update(false);
        }
        
        return false;
    }
public function actionToggleBlockHidden($blockId, $hiddenState)
    {
        $block = NavItemPageBlockItem::findOne($blockId);
        if ($block) {
            $block->is_hidden = $hiddenState;
            return $block->update(false);
        }
        
        return false;
    }
public function actionToggleBlockHidden ( $ blockId , $ hiddenState ) { $ block = NavItemPageBlockItem :: findOne ( $ blockId ) ; if ( $ block ) { $ block -> is_hidden = $ hiddenState ; return $ block -> update ( false ) ; } return false ; }
Toggle visibilty of a block.

@param integer $blockId
@param integer $hiddenState
@return array
Toggle visibilty of a block .