private static function checkPagesSetup() { if (!\Yii::$app->getModule('pages')->getLocalizedRootNode()) { $link = Html::a('pages module', ['/pages']); \Yii::$app->session->addFlash('warning', "There is no navigation root node, visit {$link} to create a root node."); } }