コード例 #1
0
 public function testMakeFieldReadonly()
 {
     $FieldList = new FieldList(new TabSet('Root', new Tab('Main', new TextField('A'), new TextField('B'))));
     $FieldList->makeFieldReadonly('A');
     $this->assertTrue($FieldList->dataFieldByName('A')->isReadonly(), 'Field nested inside a TabSet and FieldList can be marked readonly by FieldList->makeFieldReadonly()');
 }