Added missing onBlueprintCreated event for Flex Pages

This commit is contained in:
Matias Griese
2020-09-21 23:20:44 +03:00
parent ac6c8a985b
commit 790dbd381d
2 changed files with 6 additions and 0 deletions

View File

@@ -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

View File

@@ -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;
}