Default TreeDropdownField to TreeTitle

Same behaviour as in 2.x. All common elements displayed
in this field (SiteTree, Group, File) have a TreeTitle accessor.
This commit is contained in:
Ingo Schommer 2013-01-08 18:39:31 +01:00
parent 61cc033304
commit abfb3c7095

View File

@ -85,7 +85,7 @@ class TreeDropdownField extends FormField {
* @param bool $showSearch enable the ability to search the tree by
* entering the text in the input field.
*/
public function __construct($name, $title = null, $sourceObject = 'Group', $keyField = 'ID', $labelField = 'Title',
public function __construct($name, $title = null, $sourceObject = 'Group', $keyField = 'ID', $labelField = 'TreeTitle',
$showSearch = false) {
$this->sourceObject = $sourceObject;