protected function generateItems() { foreach (Config::listAll() as $name) { $this->insertItem($name, true); $this->insertItem($this->getParentName($name), false); } }
public function getModel($name) { $className = Config::getClass($name); if (!class_exists($className)) { throw new HttpException(404, Yii::t('modules/config', "Class does not exist")); } return new $className(); }