Renaming hook ContentIsRendering to PageContentIsRendering

parent c0d5630e
......@@ -3,11 +3,11 @@
namespace Modules\Core\Events\Handlers;
use League\CommonMark\CommonMarkConverter;
use Modules\Page\Events\ContentIsRendering;
use Modules\Page\Events\PageContentIsRendering;
class RenderMarkdown
{
public function handle(ContentIsRendering $event)
public function handle(PageContentIsRendering $event)
{
$converter = new CommonMarkConverter();
......
......@@ -3,7 +3,7 @@
namespace Modules\Page\Entities;
use Illuminate\Database\Eloquent\Model;
use Modules\Page\Events\ContentIsRendering;
use Modules\Page\Events\PageContentIsRendering;
class PageTranslation extends Model
{
......@@ -24,7 +24,7 @@ class PageTranslation extends Model
public function getBodyAttribute($body)
{
event($event = new ContentIsRendering($body));
event($event = new PageContentIsRendering($body));
return $event->getBody();
}
......
......@@ -2,7 +2,7 @@
namespace Modules\Page\Events;
class ContentIsRendering
class PageContentIsRendering
{
/**
* @var string The body of the page to render
......
......@@ -3,14 +3,14 @@
namespace Modules\Page\Tests;
use Illuminate\Support\Facades\Event;
use Modules\Page\Events\ContentIsRendering;
use Modules\Page\Events\PageContentIsRendering;
class ContentIsRenderingTest extends BasePageTest
class PageContentIsRenderingTest extends BasePageTest
{
/** @test */
public function it_can_change_final_content()
{
Event::listen(ContentIsRendering::class, function (ContentIsRendering $event) {
Event::listen(PageContentIsRendering::class, function (PageContentIsRendering $event) {
$event->setBody('<strong>' . $event->getOriginal() . '</strong>');
});
......
url: https://github.com/AsgardCms/Platform
versions:
"2.x.x@unreleased":
changed:
- Renamed hook <code>ContentIsRendering</code> to <code>PageContentIsRendering</code> making it more specific
"2.5.0":
added:
- Trigger event before a page is created (<code>PageIsCreating</code>) allow data to be changed
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment