infoweb\cms\helpers\CMS::formSubmitDetected PHP Метод

formSubmitDetected() публичный статический Метод

Detects if the current request was generated by a form submit
public static formSubmitDetected ( ) : boolean
Результат boolean
    public static function formSubmitDetected()
    {
        if (Yii::$app->request->getIsPost()) {
            $post = Yii::$app->request->post();
            // If one of those 3 keys is set there was an actual form submit
            if (isset($post['save']) || isset($post['save-add']) || isset($post['save-close'])) {
                return true;
            }
        }
        return false;
    }