예제 #1
0
파일: schema.php 프로젝트: gudwin/extasy
 protected function loadControls()
 {
     // Загружаем контролы
     $sql = 'select * from `%s` WHERE `schemaId`="%s" ORDER by `order` ASC';
     $sql = sprintf($sql, CCONFIG_CONTROL_TABLE, $this->id);
     $data = DB::query($sql);
     // Конвертируем в объекты
     $result = array();
     foreach ($data as $row) {
         $result[] = CConfigControlManager::createControl($row['id'], $row['name'], $row['xtype'], $row['title'], $row['config'], $row['value'], $this);
     }
     $this->controls = $result;
 }
예제 #2
0
 /**
  * Создаем контрол
  */
 public function testCreateControl()
 {
     $control = CConfigControlManager::createControl('2', 'test', 'inputField', 'XX', array(), '1', null);
     $this->assertEquals(true, $control instanceof CConfigBaseControl);
 }