src/controllers/DefaultController.php
protected function findModel($alias)
    {
        $model = Page::find()->where([
            'alias' => $alias,
            'published' => true,
        ])->one();
        if ($model !== null) {
            return $model;
        }
        throw new NotFoundHttpException(Module::t('PAGE_NOT_FOUND'));
    }
protected function findModel($alias)
    {
        $model = Page::find()->where([
            'alias' => $alias,
            'published' => true,
        ])->one();
        if ($model !== null) {
            return $model;
        }
        throw new NotFoundHttpException(Module::t('PAGE_NOT_FOUND'));
    }
Finds the Page model based on alias value.
If the model is not found, a 404 HTTP exception will be thrown.
@param string $alias
@return Page the loaded model
@throws NotFoundHttpException if the model cannot be found