Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Platform
Commits
13a433f2
Unverified
Commit
13a433f2
authored
Jul 29, 2017
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renaming hook ContentIsRendering to PageContentIsRendering
parent
c0d5630e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
8 deletions
+11
-8
RenderMarkdown.php
Modules/Core/Events/Handlers/RenderMarkdown.php
+2
-2
PageTranslation.php
Modules/Page/Entities/PageTranslation.php
+2
-2
PageContentIsRendering.php
Modules/Page/Events/PageContentIsRendering.php
+1
-1
PageContentIsRenderingTest.php
Modules/Page/Tests/PageContentIsRenderingTest.php
+3
-3
changelog.yml
Modules/Page/changelog.yml
+3
-0
No files found.
Modules/Core/Events/Handlers/RenderMarkdown.php
View file @
13a433f2
...
...
@@ -3,11 +3,11 @@
namespace
Modules\Core\Events\Handlers
;
use
League\CommonMark\CommonMarkConverter
;
use
Modules\Page\Events\ContentIsRendering
;
use
Modules\Page\Events\
Page
ContentIsRendering
;
class
RenderMarkdown
{
public
function
handle
(
ContentIsRendering
$event
)
public
function
handle
(
Page
ContentIsRendering
$event
)
{
$converter
=
new
CommonMarkConverter
();
...
...
Modules/Page/Entities/PageTranslation.php
View file @
13a433f2
...
...
@@ -3,7 +3,7 @@
namespace
Modules\Page\Entities
;
use
Illuminate\Database\Eloquent\Model
;
use
Modules\Page\Events\ContentIsRendering
;
use
Modules\Page\Events\
Page
ContentIsRendering
;
class
PageTranslation
extends
Model
{
...
...
@@ -24,7 +24,7 @@ class PageTranslation extends Model
public
function
getBodyAttribute
(
$body
)
{
event
(
$event
=
new
ContentIsRendering
(
$body
));
event
(
$event
=
new
Page
ContentIsRendering
(
$body
));
return
$event
->
getBody
();
}
...
...
Modules/Page/Events/ContentIsRendering.php
→
Modules/Page/Events/
Page
ContentIsRendering.php
View file @
13a433f2
...
...
@@ -2,7 +2,7 @@
namespace
Modules\Page\Events
;
class
ContentIsRendering
class
Page
ContentIsRendering
{
/**
* @var string The body of the page to render
...
...
Modules/Page/Tests/ContentIsRenderingTest.php
→
Modules/Page/Tests/
Page
ContentIsRenderingTest.php
View file @
13a433f2
...
...
@@ -3,14 +3,14 @@
namespace
Modules\Page\Tests
;
use
Illuminate\Support\Facades\Event
;
use
Modules\Page\Events\ContentIsRendering
;
use
Modules\Page\Events\
Page
ContentIsRendering
;
class
ContentIsRenderingTest
extends
BasePageTest
class
Page
ContentIsRenderingTest
extends
BasePageTest
{
/** @test */
public
function
it_can_change_final_content
()
{
Event
::
listen
(
ContentIsRendering
::
class
,
function
(
ContentIsRendering
$event
)
{
Event
::
listen
(
PageContentIsRendering
::
class
,
function
(
Page
ContentIsRendering
$event
)
{
$event
->
setBody
(
'<strong>'
.
$event
->
getOriginal
()
.
'</strong>'
);
});
...
...
Modules/Page/changelog.yml
View file @
13a433f2
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment