original_string: public function prePersist(LifecycleEventArgs $args)
      {
  
          // update child routes
          $entity = $args->getEntity();
  
          if (    $entity instanceof RoutableNodeInterface
              &&  $entity->hasAutoNodeRouteGeneration()
          ) {
              $routeManager = $this->container->get('mm_cmf_routing.node_route_manager');
              $entity->addRoute($routeManager->generateAutoNodeRoute($entity));
          }
  
          return;
      }
code: public function prePersist(LifecycleEventArgs $args)
      {
  
          // update child routes
          $entity = $args->getEntity();
  
          if (    $entity instanceof RoutableNodeInterface
              &&  $entity->hasAutoNodeRouteGeneration()
          ) {
              $routeManager = $this->container->get('mm_cmf_routing.node_route_manager');
              $entity->addRoute($routeManager->generateAutoNodeRoute($entity));
          }
  
          return;
      }
code_tokens: public function prePersist ( LifecycleEventArgs $ args ) { // update child routes $ entity = $ args -> getEntity ( ) ; if ( $ entity instanceof RoutableNodeInterface && $ entity -> hasAutoNodeRouteGeneration ( ) ) { $ routeManager = $ this -> container -> get ( 'mm_cmf_routing.node_route_manager' ) ; $ entity -> addRoute ( $ routeManager -> generateAutoNodeRoute ( $ entity ) ) ; } return ; }
docstring: prePersist Event
  whenever a new Node is created, also create automatically a new NodeRoute
  
  @param LifecycleEventArgs $args
docstring_tokens: prePersist Event whenever a new Node is created also create automatically a new NodeRoute