diff --git a/Modules/Core/Events/Handlers/RenderMarkdown.php b/Modules/Core/Events/Handlers/RenderMarkdown.php index 81a9b141e..ccbf26a76 100644 --- a/Modules/Core/Events/Handlers/RenderMarkdown.php +++ b/Modules/Core/Events/Handlers/RenderMarkdown.php @@ -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(); diff --git a/Modules/Page/Entities/PageTranslation.php b/Modules/Page/Entities/PageTranslation.php index bd73acb15..536555e81 100644 --- a/Modules/Page/Entities/PageTranslation.php +++ b/Modules/Page/Entities/PageTranslation.php @@ -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(); } diff --git a/Modules/Page/Events/ContentIsRendering.php b/Modules/Page/Events/PageContentIsRendering.php similarity index 95% rename from Modules/Page/Events/ContentIsRendering.php rename to Modules/Page/Events/PageContentIsRendering.php index 5986a51bb..1bb0d73c7 100644 --- a/Modules/Page/Events/ContentIsRendering.php +++ b/Modules/Page/Events/PageContentIsRendering.php @@ -2,7 +2,7 @@ namespace Modules\Page\Events; -class ContentIsRendering +class PageContentIsRendering { /** * @var string The body of the page to render diff --git a/Modules/Page/Tests/ContentIsRenderingTest.php b/Modules/Page/Tests/PageContentIsRenderingTest.php similarity index 81% rename from Modules/Page/Tests/ContentIsRenderingTest.php rename to Modules/Page/Tests/PageContentIsRenderingTest.php index 4d768ce17..319faa20c 100644 --- a/Modules/Page/Tests/ContentIsRenderingTest.php +++ b/Modules/Page/Tests/PageContentIsRenderingTest.php @@ -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('' . $event->getOriginal() . ''); }); diff --git a/Modules/Page/changelog.yml b/Modules/Page/changelog.yml index 0d649e858..970cf2d62 100644 --- a/Modules/Page/changelog.yml +++ b/Modules/Page/changelog.yml @@ -1,5 +1,8 @@ url: https://github.com/AsgardCms/Platform versions: + "2.x.x@unreleased": + changed: + - Renamed hook ContentIsRendering to PageContentIsRendering making it more specific "2.5.0": added: - Trigger event before a page is created (PageIsCreating) allow data to be changed