How do I get a default value to appear when using the map method? What used to work on v2.x doesnt on 3.2
Example:
In my Model I have:
public function getListOfSites(){
if($sites = DataObject::get('Site'))
return $sites->map('ID', 'Title', 'All');
}
Then in Page.php I want to add the sites to the settings tab like so
$fields->addFieldToTab('Root.Settings', new DropdownField('Site', 'Select a site that will see this article', Site::getListOfSites()));
Where "All" is was what appeared as the default value in a drop down menu in v2.x but no longer works... What else can I do?