[+] Encapsulate method to format course tab index

This commit is contained in:
Hykilpikonna
2019-10-20 19:41:28 -04:00
parent ab795674b2
commit 707e96d2e9
+11
View File
@@ -34,4 +34,15 @@ export class CourseUtils
return result;
}
/**
* Format course to tab index string
*
* @param course Course object
* @return string Tab index
*/
public static formatTabIndex(course: Course): string
{
return `course/${course.id}/${course.name.toLowerCase().split(' ').join('-')}`;
}
}