コード例 #1
0
 protected function generateItems()
 {
     foreach (Config::listAll() as $name) {
         $this->insertItem($name, true);
         $this->insertItem($this->getParentName($name), false);
     }
 }
コード例 #2
0
 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();
 }