MDL-50085 templates: Minor fixes from peer review

* rename get_filename to get_filepath
* phpdocs fixes
* improve formatting of exceptions
* lang string improvement
This commit is contained in:
Damyon Wiese
2015-05-05 03:19:39 +02:00
committed by Eloy Lafuente (stronk7)
parent fcc383db0f
commit 410034eef0
6 changed files with 17 additions and 17 deletions
+2 -1
View File
@@ -42,6 +42,7 @@ class api {
*
* @param string $component Filter the list to a single component.
* @param string $search Search string to optionally filter the list of templates.
* @param string $themename The name of the current theme.
* @return array[string] Where each template is in the form "component/templatename".
*/
public static function list_templates($component = '', $search = '', $themename = '') {
@@ -50,7 +51,7 @@ class api {
$templatedirs = array();
$results = array();
if ($component != '') {
if ($component !== '') {
// Just look at one component for templates.
$dirs = mustache_template_finder::get_template_directories_for_component($component, $themename);