skeeks\cms\helpers\UrlHelper::getCurrent PHP Method

getCurrent() public static method

public static getCurrent ( ) : static
return static
    public static function getCurrent()
    {
        if (static::$currentUrl === null) {
            //TODO: доработать вычисление текущего роута
            static::$currentUrl = static::constructCurrent();
        }
        return static::$currentUrl;
    }

Usage Example

示例#1
0
 /**
  * Запрос пришел на валидацию ajax формы?
  * @return bool
  */
 public function isRequestOnValidateAjaxForm()
 {
     if (\Yii::$app->request->isAjax && !\Yii::$app->request->isPjax && UrlHelper::getCurrent()->issetSystemParam(static::VALIDATION_AJAX_FORM_SYSTEM_NAME)) {
         return true;
     }
     return false;
 }
All Usage Examples Of skeeks\cms\helpers\UrlHelper::getCurrent