mirror of
https://github.com/getgrav/grav.git
synced 2026-03-01 01:51:29 +01:00
Added missing onBlueprintCreated event for Flex Pages
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
* Fixed `Security::sanitizeSVG()` creating an empty file if SVG file cannot be parsed
|
||||
* Fixed infinite loop in blueprints with `extend@` to a parent stream
|
||||
* Added missing `Stream::create()` method
|
||||
* Added missing `onBlueprintCreated` event for Flex Pages
|
||||
|
||||
# v1.7.0-rc.16
|
||||
## 09/01/2020
|
||||
|
||||
@@ -422,6 +422,11 @@ class PageObject extends FlexPageObject
|
||||
$blueprint = $this->getFlexDirectory()->getBlueprint($template, 'blueprints://pages');
|
||||
}
|
||||
|
||||
if ($name === '') {
|
||||
// Support onBlueprintCreated event just like in Pages::blueprints($template)
|
||||
Grav::instance()->fireEvent('onBlueprintCreated', new Event(['blueprint' => $blueprint, 'type' => $template]));
|
||||
}
|
||||
|
||||
return $blueprint;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user