mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
MINOR Use shorthand syntax for DataList querying
This commit is contained in:
parent
9592b28ecd
commit
ad28780959
@ -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;
|
||||
}
|
||||
|
@ -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(
|
||||
|
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user