Example #1
0
 /**
  * @inheritdoc
  */
 public function parseRequest($manager, $request)
 {
     if ($request->serverName == Yii::$app->getModule('core')->serverName) {
         $_path = $request->getPathInfo();
     } else {
         $_path = $request->absoluteUrl;
     }
     $_path = !empty($_path) ? $_path : ':mainpage:';
     if (null !== ($model = Page::getByUrlPath($_path))) {
         return ['/page/page/' . $model['show_type'], ['id' => $model['id']]];
     }
     return false;
 }