mirror of
https://github.com/getgrav/grav.git
synced 2026-05-07 15:55:53 +02:00
added new onPageContentProcessed() event that is post-content processing but pre-caching
This commit is contained in:
@@ -358,11 +358,34 @@ class Page
|
||||
|
||||
$this->content = $content;
|
||||
|
||||
// Process any post-processing but pre-caching functionality
|
||||
self::$grav->fireEvent('onPageContentProcessed', new Event(['page' => $this]));
|
||||
|
||||
}
|
||||
|
||||
return $this->content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Needed by the onPageContentProcessed event to get the raw page content
|
||||
*
|
||||
* @return string the current page content
|
||||
*/
|
||||
public function getRawContent()
|
||||
{
|
||||
return $this->content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Needed by the onPageContentProcessed event to set the raw page content
|
||||
*
|
||||
* @param $content
|
||||
*/
|
||||
public function setRawContent($content)
|
||||
{
|
||||
$this->content = $content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get value from a page variable (used mostly for creating edit forms).
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user