original_string: public function url($path = null)
      {
          $routeAction = 'Cms\Classes\CmsController@run';
  
          if (self::$actionExists === null) {
              self::$actionExists = Route::getRoutes()->getByAction($routeAction) !== null;
          }
  
          if (substr($path, 0, 1) == '/') {
              $path = substr($path, 1);
          }
  
          if (self::$actionExists) {
              return Url::action($routeAction, ['slug' => $path]);
          }
  
          return Url::to($path);
      }
code: public function url($path = null)
      {
          $routeAction = 'Cms\Classes\CmsController@run';
  
          if (self::$actionExists === null) {
              self::$actionExists = Route::getRoutes()->getByAction($routeAction) !== null;
          }
  
          if (substr($path, 0, 1) == '/') {
              $path = substr($path, 1);
          }
  
          if (self::$actionExists) {
              return Url::action($routeAction, ['slug' => $path]);
          }
  
          return Url::to($path);
      }
code_tokens: public function url ( $ path = null ) { $ routeAction = 'Cms\Classes\CmsController@run' ; if ( self :: $ actionExists === null ) { self :: $ actionExists = Route :: getRoutes ( ) -> getByAction ( $ routeAction ) !== null ; } if ( substr ( $ path , 0 , 1 ) == '/' ) { $ path = substr ( $ path , 1 ) ; } if ( self :: $ actionExists ) { return Url :: action ( $ routeAction , [ 'slug' => $ path ] ) ; } return Url :: to ( $ path ) ; }
docstring: Returns a URL in context of the Frontend
docstring_tokens: Returns a URL in context of the Frontend