Skip to content

Commit e6efca8

Browse files
committed
📝 (etc) comments, formatting, license
1 parent e99c871 commit e6efca8

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@
2424
}
2525
},
2626
"minimum-stability": "dev",
27-
"prefer-stable": true
27+
"prefer-stable": true,
28+
"license": "MIT"
2829
}

src/LumberjackSortAndSummaryExtension.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,25 @@
88

99
class LumberjackSortAndSummaryExtension extends Lumberjack
1010
{
11+
12+
// this will use $summary_fields and $default_sort of the provided class
1113
public function getLumberjackPagesForGridField($excluded = [])
1214
{
1315
$childClasses = $this->getChildClassesOtherThanSiteTree();
1416

1517
if (count($childClasses) === 1) {
1618
$className = $childClasses[0];
17-
return $className::get()->filter([
18-
'ParentID' => $this->owner->ID,
19-
'ClassName' => $excluded,
20-
]);
19+
return $className::get()->filter(
20+
[
21+
'ParentID' => $this->owner->ID,
22+
'ClassName' => $excluded,
23+
]
24+
);
2125
}
2226
return parent::getLumberjackPagesForGridField();
2327
}
2428

29+
// this will change the tab title
2530
public function getLumberJackTitle()
2631
{
2732
$childClasses = $this->getChildClassesOtherThanSiteTree();

0 commit comments

Comments
 (0)