Merge pull request #2536 from mattclegg/1585990198

ENHANCEMENT: Remove unused $controller from lambda function
This commit is contained in:
Robbie Averill 2020-04-05 19:16:44 -07:00 committed by GitHub
commit e81659344c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1674,9 +1674,8 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
'getTreeTitle' => 'HTMLFragment'
));
$controller = $this;
$columns->setFieldFormatting(array(
'listChildrenLink' => function ($value, &$item) use ($controller) {
'listChildrenLink' => function ($value, &$item) {
/** @var SiteTree $item */
$num = $item ? $item->numChildren() : null;
if ($num) {
@ -1687,7 +1686,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
);
}
},
'getTreeTitle' => function ($value, &$item) use ($controller) {
'getTreeTitle' => function ($value, &$item) {
$title = sprintf(
'<a class="action-detail" href="%s">%s</a>',
Controller::join_links(