為 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,如圖所示。