protected function _update_route(array $blocks_to_update, $route_entity)
 {
     $has_blocks = sizeof($blocks_to_update) ? true : false;
     if (!$has_blocks && !$this->_route_is_customized($route_entity->to_array())) {
         $this->route_mapper->delete($route_entity);
     } else {
         $route_entity->set_has_blocks($has_blocks);
         $this->route_mapper->save($route_entity);
     }
 }
 protected function _update_route($blocks_to_update, $route)
 {
     $ex_positions = $route->get_ex_positions();
     $hiding_blocks = $route->get_hide_blocks();
     $has_blocks = sizeof($blocks_to_update) ? true : false;
     if (!$has_blocks && !$hiding_blocks && !sizeof($ex_positions)) {
         $this->route_mapper->delete($route);
     } else {
         $route->set_has_blocks($has_blocks);
         $this->route_mapper->save($route);
     }
 }
 protected function _update_route(\blitze\sitemaker\model\blocks\entity\route $entity, array $route_prefs)
 {
     $entity->set_hide_blocks($route_prefs['hide_blocks']);
     $entity->set_ex_positions($route_prefs['ex_positions']);
     $this->route_mapper->save($entity);
 }
 protected function _duplicate_route(\blitze\sitemaker\model\blocks\entity\route $from_entity, $route, $ext_name, $style)
 {
     $copy = clone $from_entity;
     $copy->set_route($route)->set_ext_name($ext_name)->set_style($style);
     return $this->route_mapper->save($copy);
 }