Skip to content

Commit

Permalink
renderWithSlug returns string
Browse files Browse the repository at this point in the history
  • Loading branch information
HansSchouten committed Dec 28, 2019
1 parent 1d9236b commit bc1b655
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Modules/GrapesJS/Block/BlockRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,16 @@ public function __construct(ThemeContract $theme, PageContract $page, $forPageBu
}

/**
* Output a rendered theme block with the given slug using the given block data.
* Render a theme block with the given slug using the given block data.
*
* @param string $blockSlug
* @param $blockData
* @return string
*/
public function renderWithSlug(string $blockSlug, $blockData)
{
$block = new ThemeBlock($this->theme, $blockSlug);
echo $this->render($block, $blockData);
return $this->render($block, $blockData);
}

/**
Expand Down

0 comments on commit bc1b655

Please sign in to comment.