为 DataObject 显示的控制列

class MyDataObject extends DataObject {

    private static $db = array(
        'Name' => 'Varchar'
    );

    private static $has_one = array(
        'OtherDataObject' => 'OtherDataObject'
    );
    
    private static $summary_fields = array(
        'Name',
        'OtherDataObject.Name'
    );
    
    private static $field_labels = array(
        'OtherDataObject.Name' => 'Other Data Object'
    );
}

ModelAdmin 使用 summary_fields 生成它显示的列。要指定列的名称,请使用 field_labels,如图所示。