💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
protected function isItemActive($item) { if (isset($item['url']) && is_array($item['url']) && isset($item['url'][0])) { $route = $item['url'][0]; if ($route[0] !== '/' && Yii::$app->controller) { $route = ltrim(Yii::$app->controller->module->getUniqueId() . '/' . $route, '/'); } $route = ltrim($route,'/'); $route = explode('/', $route); $path = explode('/', $this->route); if ($route[1] != $path[1] && $route !== $this->noDefaultRoute && $route !== $this->noDefaultAction) { return false; } return true; } return false; }