Skip to content

Commit

Permalink
Merge pull request #2 from xini/fix-publish-recursive
Browse files Browse the repository at this point in the history
add `onAfterPublishRecursive` hook
  • Loading branch information
dizzystuff authored May 18, 2023
2 parents ed8bfdd + 50bab45 commit c314c24
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/Extensions/SearchRecordExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@ public function onAfterPublish()
}
}
}

public function onAfterPublishRecursive()
{
$engines = $this->getOwner()->getSearchEngines();
if ($engines) {
foreach ($engines as $engine) {
$engine->publishEntry($this->getOwner());
}
}
}

public function onAfterDelete()
{
Expand All @@ -68,7 +78,7 @@ public function onAfterUnpublish()
}
}
}

public function getSearchEngines()
{
$classes = $this->getOwner()->getSearchEngineClasses();
Expand Down

0 comments on commit c314c24

Please sign in to comment.