Skip to content

Commit

Permalink
FIX Remove infinite loop by reverting #127 (#129)
Browse files Browse the repository at this point in the history
Revert "FIX Allow extension methods to be used in lumberjack  (#127)"

This reverts commit fcdfcdf.
  • Loading branch information
GuySartorelli authored Jul 31, 2023
1 parent fcdfcdf commit ecefcdc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions src/Forms/GridFieldConfig_Lumberjack.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,5 @@ public function __construct($itemsPerPage = null)
$this->addComponent(new GridFieldSiteTreeState());

$pagination->setThrowExceptionOnBadDataType(true);

$this->extend('updateConfig');
}
}
6 changes: 3 additions & 3 deletions src/Model/Lumberjack.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public function liveChildren($showAll = false, $onlyDeletedFromStage = false)
*/
protected function getLumberjackTitle()
{
if ($this->getOwner()->hasMethod('getLumberjackTitle')) {
if (method_exists($this->owner, 'getLumberjackTitle')) {
return $this->owner->getLumberjackTitle();
}

Expand All @@ -189,7 +189,7 @@ protected function getLumberjackTitle()
*/
protected function getLumberjackGridFieldConfig()
{
if ($this->getOwner()->hasMethod('getLumberjackGridFieldConfig')) {
if (method_exists($this->owner, 'getLumberjackGridFieldConfig')) {
return $this->owner->getLumberjackGridFieldConfig();
}

Expand Down Expand Up @@ -227,7 +227,7 @@ protected function shouldFilter()
*/
public function getLumberjackPagesForGridfield($excluded = array())
{
if ($this->getOwner()->hasMethod('getLumberjackPagesForGridfield')) {
if (method_exists($this->owner, 'getLumberjackPagesForGridfield')) {
return $this->owner->getLumberjackPagesForGridfield($excluded);
}

Expand Down

0 comments on commit ecefcdc

Please sign in to comment.