protected function render_block(\blitze\sitemaker\model\blocks\entity\block $entity)
 {
     $block_name = $entity->get_name();
     if ($block_instance = $this->block_factory->get_block($block_name)) {
         $default_settings = $block_instance->get_config(array());
         $settings = $this->blocks->sync_settings($default_settings, $entity->get_settings());
         $entity->set_settings($settings);
         $block_data = $entity->to_array();
         $disp_data = $block_instance->display($block_data, true);
         return array_merge($block_data, array('id' => $block_data['bid'], 'title' => !empty($block_data['title']) ? $block_data['title'] : $this->user->lang($disp_data['title']), 'content' => !empty($disp_data['content']) ? $disp_data['content'] : $this->user->lang('BLOCK_NO_DATA')));
     }
 }
 public function clear_cache()
 {
     $this->blocks->clear_cache();
 }