original_string: protected function generateCategoryUrl()
      {
          /** @var $target PageModel */
          if ($this->jumpTo && ($target = $this->objModel->getRelated('jumpTo')) instanceof PageModel) {
              $page = $target;
          } else {
              $page = $GLOBALS['objPage'];
          }
  
          $manager = System::getContainer()->get('codefog_news_categories.manager');
  
          /** @var NewsCategoryModel $category */
          $category = NewsCategoryModel::findPublishedByIdOrAlias(Input::get($manager->getParameterName()));
  
          // Generate the category URL
          if ($category !== null) {
              $url = $manager->generateUrl($category, $page);
          } else {
              // Generate the regular URL
              $url = $page->getFrontendUrl();
          }
  
          return $url;
      }
code: protected function generateCategoryUrl()
      {
          /** @var $target PageModel */
          if ($this->jumpTo && ($target = $this->objModel->getRelated('jumpTo')) instanceof PageModel) {
              $page = $target;
          } else {
              $page = $GLOBALS['objPage'];
          }
  
          $manager = System::getContainer()->get('codefog_news_categories.manager');
  
          /** @var NewsCategoryModel $category */
          $category = NewsCategoryModel::findPublishedByIdOrAlias(Input::get($manager->getParameterName()));
  
          // Generate the category URL
          if ($category !== null) {
              $url = $manager->generateUrl($category, $page);
          } else {
              // Generate the regular URL
              $url = $page->getFrontendUrl();
          }
  
          return $url;
      }
code_tokens: protected function generateCategoryUrl ( ) { /** @var $target PageModel */ if ( $ this -> jumpTo && ( $ target = $ this -> objModel -> getRelated ( 'jumpTo' ) ) instanceof PageModel ) { $ page = $ target ; } else { $ page = $ GLOBALS [ 'objPage' ] ; } $ manager = System :: getContainer ( ) -> get ( 'codefog_news_categories.manager' ) ; /** @var NewsCategoryModel $category */ $ category = NewsCategoryModel :: findPublishedByIdOrAlias ( Input :: get ( $ manager -> getParameterName ( ) ) ) ; // Generate the category URL if ( $ category !== null ) { $ url = $ manager -> generateUrl ( $ category , $ page ) ; } else { // Generate the regular URL $ url = $ page -> getFrontendUrl ( ) ; } return $ url ; }
docstring: Generate the menu URL with category
  
  @return string
docstring_tokens: Generate the menu URL with category