From cc61fb5d0fd491c5faf8f527deba5b895d77ba23 Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Mon, 15 Oct 2018 13:03:10 +0300 Subject: [PATCH] BlueprintSchema: Added methods to get the type defaults --- system/src/Grav/Common/Data/BlueprintSchema.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/system/src/Grav/Common/Data/BlueprintSchema.php b/system/src/Grav/Common/Data/BlueprintSchema.php index 67a8021de..3e389e7b5 100644 --- a/system/src/Grav/Common/Data/BlueprintSchema.php +++ b/system/src/Grav/Common/Data/BlueprintSchema.php @@ -26,6 +26,23 @@ class BlueprintSchema extends BlueprintSchemaBase implements ExportInterface 'fields' => true ]; + /** + * @return array + */ + public function getTypes() + { + return $this->types; + } + + /** + * @param string $name + * @return array + */ + public function getType($name) + { + return $this->types[$name] ?? []; + } + /** * Validate data against blueprints. *