mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-31 15:24:31 +03:00
Includes: Added back support for parse theme event
Managed to do this in an API-compatible way although resuling output may differ due to new dom handling in general, although user content is used inline to remain as comptable as possible.
This commit is contained in:
@ -2,8 +2,6 @@
|
||||
|
||||
namespace BookStack\Theming;
|
||||
|
||||
use BookStack\Entities\Models\Page;
|
||||
|
||||
/**
|
||||
* The ThemeEvents used within BookStack.
|
||||
*
|
||||
@ -93,8 +91,8 @@ class ThemeEvents
|
||||
*
|
||||
* @param string $tagReference
|
||||
* @param string $replacementHTML
|
||||
* @param Page $currentPage
|
||||
* @param ?Page $referencedPage
|
||||
* @param \BookStack\Entities\Models\Page $currentPage
|
||||
* @param ?\BookStack\Entities\Models\Page $referencedPage
|
||||
*/
|
||||
const PAGE_INCLUDE_PARSE = 'page_include_parse';
|
||||
|
||||
|
@ -48,6 +48,14 @@ class ThemeService
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if there are listeners registered for the given event name.
|
||||
*/
|
||||
public function hasListeners(string $event): bool
|
||||
{
|
||||
return count($this->listeners[$event] ?? []) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a new custom artisan command to be available.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user