MDL-41000 Events: Fixed phpdoc for get_name and get_description in \core\event\base class

This commit is contained in:
Rajesh Taneja
2013-08-02 13:48:11 +08:00
parent a31e811563
commit fc9fc9fb30
2 changed files with 5 additions and 8 deletions
+1
View File
@@ -503,6 +503,7 @@ $string['unknowncourse'] = 'Unknown course named "{$a}"';
$string['unknowncourseidnumber'] = 'Unknown course ID "{$a}"';
$string['unknowncoursesection'] = 'Unknown course section in course "{$a}"';
$string['unknowncourserequest'] = 'Unknown course request';
$string['unknownevent'] = 'Unknown event';
$string['unknownfiletype'] = 'Error unknown filtertype';
$string['unknowngroup'] = 'Unknown group "{$a}"';
$string['unknownhelp'] = 'Unknown help topic {$a}';
+4 -8
View File
@@ -234,25 +234,21 @@ abstract class base implements \IteratorAggregate {
*
* Override in subclass, we can not make it static and abstract at the same time.
*
* TODO: MDL-37658
*
* @return string|\lang_string
* @return string
*/
public static function get_name() {
// Override in subclass with real lang string.
$parts = explode('\\', __CLASS__);
if (count($parts) !== 3) {
return 'unknown event';
return get_string('unknownevent', 'error');
}
return $parts[0].': '.str_replace('_', ' ', $parts[2]);
}
/**
* Returns localised description of what happened.
* Returns non-localised event description with id's for admin use only.
*
* TODO: MDL-37658
*
* @return string|\lang_string
* @return string
*/
public function get_description() {
return null;