Move this part to content_blocks/engine/model.php