added new onPageContentProcessed() event that is post-content processing but pre-caching

This commit is contained in:
Andy Miller
2014-11-07 18:17:36 -07:00
parent d596dd98dd
commit d4cb85174c

View File

@@ -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).
*