Craft\NeoService::saveBlockCollapse PHP Method

saveBlockCollapse() public method

It bypasses the elements system and performs a direct database query. This is so it doesn't cause caches to be regenerated. It's also more performant, which comes in handy when this is called in AJAX requests.
public saveBlockCollapse ( Neo_BlockModel $block ) : boolean
$block Neo_BlockModel
return boolean
    public function saveBlockCollapse(Neo_BlockModel $block)
    {
        $tableName = (new Neo_BlockRecord())->getTableName();
        craft()->db->createCommand()->update($tableName, ['collapsed' => $block->collapsed ? 1 : 0], 'id = :id', [':id' => $block->id]);
        return true;
    }