mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-01 21:58:51 +02:00
Update Group.php
move to private method
This commit is contained in:
parent
40e5c4ec59
commit
a976a1688b
@ -106,7 +106,15 @@ class Group extends DataObject
|
|||||||
return $doSet;
|
return $doSet;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getGroups
|
private function getDecodedBreadcrumbs()
|
||||||
|
{
|
||||||
|
$list = Group::get()->exclude('ID', $this->ID);
|
||||||
|
$groups = ArrayList::create();
|
||||||
|
foreach ($list as $group) {
|
||||||
|
$groups->push(['ID' => $group->ID, 'Title' => Convert::xml2raw($group->Breadcrumbs)]);
|
||||||
|
}
|
||||||
|
return $groups;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Caution: Only call on instances, not through a singleton.
|
* Caution: Only call on instances, not through a singleton.
|
||||||
@ -117,11 +125,7 @@ class Group extends DataObject
|
|||||||
*/
|
*/
|
||||||
public function getCMSFields()
|
public function getCMSFields()
|
||||||
{
|
{
|
||||||
$list = Group::get()->exclude('ID', $this->ID);
|
$groups = $this->getDecodedBreadcrumbs();
|
||||||
$groups = ArrayList::create();
|
|
||||||
foreach ($list as $group) {
|
|
||||||
$groups->push(['ID' => $group->ID, 'Title' => Convert::xml2raw($group->Breadcrumbs)]);
|
|
||||||
}
|
|
||||||
$fields = new FieldList(
|
$fields = new FieldList(
|
||||||
new TabSet(
|
new TabSet(
|
||||||
"Root",
|
"Root",
|
||||||
|
Loading…
Reference in New Issue
Block a user