original_string: private function updateAlias(ChangelanguageNavigationEvent $event)
      {
          /** @var NewsCategoryModel $modelAdapter */
          $modelAdapter = $this->framework->getAdapter(NewsCategoryModel::class);
  
          $param = $this->manager->getParameterName();
  
          if (!($alias = $event->getUrlParameterBag()->getUrlAttribute($param))) {
              return;
          }
  
          $model = $modelAdapter->findPublishedByIdOrAlias($alias);
  
          // Set the alias only for multilingual models
          if (null !== $model && $model instanceof Multilingual) {
              $event->getUrlParameterBag()->setUrlAttribute(
                  $param,
                  $model->getAlias($event->getNavigationItem()->getRootPage()->rootLanguage)
              );
          }
      }
code: private function updateAlias(ChangelanguageNavigationEvent $event)
      {
          /** @var NewsCategoryModel $modelAdapter */
          $modelAdapter = $this->framework->getAdapter(NewsCategoryModel::class);
  
          $param = $this->manager->getParameterName();
  
          if (!($alias = $event->getUrlParameterBag()->getUrlAttribute($param))) {
              return;
          }
  
          $model = $modelAdapter->findPublishedByIdOrAlias($alias);
  
          // Set the alias only for multilingual models
          if (null !== $model && $model instanceof Multilingual) {
              $event->getUrlParameterBag()->setUrlAttribute(
                  $param,
                  $model->getAlias($event->getNavigationItem()->getRootPage()->rootLanguage)
              );
          }
      }
code_tokens: private function updateAlias ( ChangelanguageNavigationEvent $ event ) { /** @var NewsCategoryModel $modelAdapter */ $ modelAdapter = $ this -> framework -> getAdapter ( NewsCategoryModel :: class ) ; $ param = $ this -> manager -> getParameterName ( ) ; if ( ! ( $ alias = $ event -> getUrlParameterBag ( ) -> getUrlAttribute ( $ param ) ) ) { return ; } $ model = $ modelAdapter -> findPublishedByIdOrAlias ( $ alias ) ; // Set the alias only for multilingual models if ( null !== $ model && $ model instanceof Multilingual ) { $ event -> getUrlParameterBag ( ) -> setUrlAttribute ( $ param , $ model -> getAlias ( $ event -> getNavigationItem ( ) -> getRootPage ( ) -> rootLanguage ) ) ; } }
docstring: Update the category alias value.
  
  @param ChangelanguageNavigationEvent $event
docstring_tokens: Update the category alias value .