src/controllers/RenderController.php
public function actionIndex(string $page = null): string
    {
        if (!$page) {
            $page = $this->getPageName();
        }

        $page = $this->module->find($page);

        if ($page === null) {
            throw new NotFoundHttpException(Yii::t('yii', 'Page not found.'));
        }

        return $this->renderPage($page);
    }
public function actionIndex(string $page = null): string
    {
        if (!$page) {
            $page = $this->getPageName();
        }

        $page = $this->module->find($page);

        if ($page === null) {
            throw new NotFoundHttpException(Yii::t('yii', 'Page not found.'));
        }

        return $this->renderPage($page);
    }
Index action.
@param string|null $page
@return string rendered page
@throws NotFoundHttpException
@throws \yii\base\InvalidConfigException