diff --git a/lib/SimpleSAML/XHTML/Template.php b/lib/SimpleSAML/XHTML/Template.php index 4a5bb4d3302d9d748653d4b90739f217558484e7..35941ef106291d9aaac222074409a01cfb10e69e 100644 --- a/lib/SimpleSAML/XHTML/Template.php +++ b/lib/SimpleSAML/XHTML/Template.php @@ -187,6 +187,25 @@ class SimpleSAML_XHTML_Template { } + /** + * Retrieve a tag. + * + * This function retrieves a tag as an array with language => string mappings. + * + * @param $tag The tag name. + * @return As associative array with language => string mappings, or NULL if the tag wasn't found. + */ + public function getTag($tag) { + assert('is_string($tag)'); + + if(!array_key_exists($tag, $this->langtext)) { + return NULL; + } + + return $this->langtext[$tag]; + } + + /** * Include text in the current language. *