mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
MDL-32009 messaging: Add is_enabled method to plugintype_message
This commit is contained in:
parent
bc795b98e9
commit
bede23f7bc
1 changed files with 12 additions and 0 deletions
|
@ -2297,6 +2297,18 @@ class plugininfo_message extends plugininfo_base {
|
|||
}
|
||||
return parent::get_settings_url();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see plugintype_interface::is_enabled()
|
||||
*/
|
||||
public function is_enabled() {
|
||||
$processors = get_message_processors();
|
||||
if (isset($processors[$this->name])) {
|
||||
return $processors[$this->name]->configured && $processors[$this->name]->enabled;
|
||||
} else {
|
||||
return parent::is_enabled();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue