Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
chamilo-lms/main/inc/lib/hook/HookNotificationContent.php

42 lines
1022 B

<?php
/* For licensing terms, see /license.txt */
/**
* This file contains the Hook Event class for Content of Notifications
*/
/**
* Class HookNotificationContent
*/
class HookNotificationContent extends HookEvent implements HookNotificationContentEventInterface
{
/**
* Construct
*/
protected function __construct()
{
parent::__construct('HookNotificationContent');
}
/**
* @param int $type
* @return int
*/
public function notifyNotificationContent($type)
{
/** @var \HookNotificationContentObserverInterface $observer */
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);
}
}
return $this->eventData;
}
return null;
}
}