MINOR Use shorthand syntax for DataList querying

This commit is contained in:
Sean Harvey 2012-05-28 21:05:24 +12:00
parent 9592b28ecd
commit ad28780959
3 changed files with 3 additions and 3 deletions

View File

@ -45,7 +45,7 @@ class Folder_UnusedAssetsField extends CompositeField {
*/
protected function getAssetList() {
$where = $this->folder->getUnusedFilesListFilter();
$files = DataList::create('File')->where($where);
$files = File::get()->where($where);
$field = new GridField('AssetList', false, $files);
return $field;
}

View File

@ -44,7 +44,7 @@ class SiteConfig extends DataObject implements PermissionProvider {
function getCMSFields() {
Requirements::javascript(CMS_DIR . "/javascript/SitetreeAccess.js");
$groupsMap = DataList::create('Group')->map('ID', 'Breadcrumbs')->toArray();
$groupsMap = Group::get()->map('ID', 'Breadcrumbs')->toArray();
asort($groupsMap);
$fields = new FieldList(

View File

@ -1894,7 +1894,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
* @return FieldList
*/
function getSettingsFields() {
$groupsMap = DataList::create('Group')->map('ID', 'Breadcrumbs')->toArray();
$groupsMap = Group::get()->map('ID', 'Breadcrumbs')->toArray();
asort($groupsMap);
$fields = new FieldList(