|
@@ -1,7 +1,8 @@
|
|
|
<?php
|
|
|
|
|
|
|
|
|
- * This file contains the Hook Event class for Content of Notifications
|
|
|
+ * This file contains the Hook Event class for Content format of Notifications
|
|
|
+ * @package chamilo.library.hook
|
|
|
*/
|
|
|
|
|
|
|
|
@@ -20,16 +21,21 @@ class HookNotificationContent extends HookEvent implements HookNotificationConte
|
|
|
|
|
|
|
|
|
* @param int $type
|
|
|
- * @return int
|
|
|
+ * @return array|null
|
|
|
*/
|
|
|
public function notifyNotificationContent($type)
|
|
|
{
|
|
|
|
|
|
+
|
|
|
if (isset($this->eventData['content'])) {
|
|
|
+
|
|
|
$this->eventData['type'] = $type;
|
|
|
+
|
|
|
foreach ($this->observers as $observer) {
|
|
|
$data = $observer->hookNotificationContent($this);
|
|
|
+
|
|
|
if (isset($data['content'])) {
|
|
|
+
|
|
|
$this->setEventData($data);
|
|
|
}
|
|
|
}
|