Skip to content
Snippets Groups Projects
Commit 314a74d6 authored by Olav Morken's avatar Olav Morken
Browse files

Template: add getTag helper function, to retrieve a given tag.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@745 44740490-163a-0410-bde0-09ae8108e29a
parent e257d9a0
No related branches found
No related tags found
No related merge requests found
...@@ -187,6 +187,25 @@ class SimpleSAML_XHTML_Template { ...@@ -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. * Include text in the current language.
* *
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment