Merge branch 'MDL-75211-master' of https://github.com/ferranrecio/moodle

This commit is contained in:
Sara Arjona
2022-10-21 09:07:58 +03:00
committed by Ilya Tregubov
3 changed files with 38 additions and 1 deletions
+10
View File
@@ -215,6 +215,16 @@ class template {
$this->tags = $matches['tags'];
}
/**
* Check if a tag is present in the template.
*
* @param bool $tagname the tag to check (without ##)
* @return bool if the tag is present
*/
public function has_tag(string $tagname): bool {
return in_array($tagname, $this->tags);
}
/**
* Return the current template name.
*