Skip to content

Commit

Permalink
API Update references to API which has been renamed
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Oct 2, 2024
1 parent a7e5891 commit 02c16e1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/GridFieldArchiveAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public function getColumnContent($gridField, $record, $columnName)
$field = $this->getArchiveAction($gridField, $record);

if ($field) {
return $field->Field();
return $field->renderField();
}

return null;
Expand Down
2 changes: 1 addition & 1 deletion src/GridFieldRestoreAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public function getColumnContent($gridField, $record, $columnName)
{
$field = $this->getRestoreAction($gridField, $record, $columnName);

return $field ? $field->Field() : null;
return $field ? $field->renderField() : null;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions tests/php/GridFieldRestoreActionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function testDontShowRestoreButtons()
if (Security::getCurrentUser()) {
Security::setCurrentUser(null);
}
$content = new CSSContentParser($this->gridField->FieldHolder());
$content = new CSSContentParser($this->gridField->renderFieldHolder());
// Check that there are content
$this->assertEquals(4, count($content->getBySelector('.ss-gridfield-item') ?? []));
// Make sure that there are no restore buttons
Expand All @@ -81,7 +81,7 @@ public function testDontShowRestoreButtons()
public function testShowRestoreButtonsWithAdminPermission()
{
$this->logInWithPermission('ADMIN');
$content = new CSSContentParser($this->gridField->FieldHolder());
$content = new CSSContentParser($this->gridField->renderFieldHolder());
$restoreButtons = $content->getBySelector('.action-restore');
$this->assertEquals(3, count($restoreButtons ?? []), 'Restore buttons should show when logged in.');
}
Expand Down

0 comments on commit 02c16e1

Please sign in to comment.