MDL-67585 core_course: add support for custom titles to content_item
authorJake Dallimore <jake@moodle.com>
Wed, 22 Jan 2020 05:49:28 +0000 (13:49 +0800)
committerJake Dallimore <jake@moodle.com>
Thu, 20 Feb 2020 01:28:57 +0000 (09:28 +0800)
commit94420851a5e07a607c65572c488ed8fb65f57f7a
tree119c8342fd85d30843c9d43478235f832f1d46d6
parentdd8048e35032b551adaf1bd64ab453d8adb3a4ac
MDL-67585 core_course: add support for custom titles to content_item

Plugins have always been able to return either a string or a lang string
when implementing the hook, 'get_shortcuts'. Since content_items will
be the replacement for that stdClass implementation, we need a way
for plugins to continue to have this flexibility. This just provides
a small contract and some classes that plugins can use in future.
course/classes/local/entity/content_item.php
course/classes/local/entity/lang_string_title.php [new file with mode: 0644]
course/classes/local/entity/string_title.php [new file with mode: 0644]
course/classes/local/entity/title.php [new file with mode: 0644]
course/tests/content_item_test.php