mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +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() {
|
protected function getAssetList() {
|
||||||
$where = $this->folder->getUnusedFilesListFilter();
|
$where = $this->folder->getUnusedFilesListFilter();
|
||||||
$files = DataList::create('File')->where($where);
|
$files = File::get()->where($where);
|
||||||
$field = new GridField('AssetList', false, $files);
|
$field = new GridField('AssetList', false, $files);
|
||||||
return $field;
|
return $field;
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ class SiteConfig extends DataObject implements PermissionProvider {
|
|||||||
function getCMSFields() {
|
function getCMSFields() {
|
||||||
Requirements::javascript(CMS_DIR . "/javascript/SitetreeAccess.js");
|
Requirements::javascript(CMS_DIR . "/javascript/SitetreeAccess.js");
|
||||||
|
|
||||||
$groupsMap = DataList::create('Group')->map('ID', 'Breadcrumbs')->toArray();
|
$groupsMap = Group::get()->map('ID', 'Breadcrumbs')->toArray();
|
||||||
asort($groupsMap);
|
asort($groupsMap);
|
||||||
|
|
||||||
$fields = new FieldList(
|
$fields = new FieldList(
|
||||||
|
@ -1894,7 +1894,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
|||||||
* @return FieldList
|
* @return FieldList
|
||||||
*/
|
*/
|
||||||
function getSettingsFields() {
|
function getSettingsFields() {
|
||||||
$groupsMap = DataList::create('Group')->map('ID', 'Breadcrumbs')->toArray();
|
$groupsMap = Group::get()->map('ID', 'Breadcrumbs')->toArray();
|
||||||
asort($groupsMap);
|
asort($groupsMap);
|
||||||
|
|
||||||
$fields = new FieldList(
|
$fields = new FieldList(
|
||||||
|
Loading…
Reference in New Issue
Block a user