mirror of
https://github.com/typemill/typemill.git
synced 2025-09-01 18:03:23 +02:00
Version 1.2.9: Some preparations
This commit is contained in:
35
system/Events/OnOriginalLoaded.php
Normal file
35
system/Events/OnOriginalLoaded.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Typemill\Events;
|
||||
|
||||
use Symfony\Component\EventDispatcher\Event;
|
||||
|
||||
use Typemill\Extensions\ParsedownExtension;
|
||||
|
||||
/**
|
||||
* Event for html page.
|
||||
*/
|
||||
|
||||
class OnOriginalLoaded extends Event
|
||||
{
|
||||
protected $data;
|
||||
|
||||
public function __construct($data)
|
||||
{
|
||||
$this->data = $data;
|
||||
}
|
||||
|
||||
public function getMarkdown()
|
||||
{
|
||||
return $this->data;
|
||||
}
|
||||
|
||||
public function getHTML()
|
||||
{
|
||||
$parsedown = new ParsedownExtension();
|
||||
$contentArray = $parsedown->text($this->data);
|
||||
$contentHTML = $parsedown->markup($contentArray);
|
||||
|
||||
return $contentHTML;
|
||||
}
|
||||
}
|
14
system/Events/OnSessionSegmentsLoaded.php
Normal file
14
system/Events/OnSessionSegmentsLoaded.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace Typemill\Events;
|
||||
|
||||
use Symfony\Component\EventDispatcher\Event;
|
||||
|
||||
/**
|
||||
* Event for breadcrumb.
|
||||
*/
|
||||
|
||||
class OnSessionSegmentsLoaded extends BaseEvent
|
||||
{
|
||||
|
||||
}
|
Reference in New Issue
Block a user