Files
Chamilo/main/inc/lib/hook/HookNotificationTitle.php
Xes 73154ae174
Behat tests 1.11.x 🐞 / PHP 7.4 Test on ubuntu-latest (push) Canceled after 0s
PHP-CS-Fixer / composer_install (7.4) (push) Canceled after 0s
Chamilo 1.11.40 (ZIP oficial v1.11.40)
Fuente: https://github.com/chamilo/chamilo-lms/releases/download/v1.11.40/chamilo-1.11.40.zip
sha256: 1cf4bf2cc7bae1ef1a1eff643235db1d552f78ddf4b6dd1e2d2dac9868679439
Snapshot independiente (rama huerfana); diffable vs 1.11.38. vendor incluido.
2026-08-06 17:59:45 +02:00

51 lines
1.3 KiB
PHP

<?php
/* For licensing terms, see /license.txt */
/**
* This file contains the Hook Event class for Title of Notifications.
*
* @package chamilo.library.hook
*/
/**
* Class HookNotificationTitle.
*/
class HookNotificationTitle extends HookEvent implements HookNotificationTitleEventInterface
{
/**
* Construct.
*/
protected function __construct()
{
parent::__construct('HookNotificationTitle');
}
/**
* @param int $type
*
* @return array|null
*/
public function notifyNotificationTitle($type)
{
/** @var \HookNotificationTitleObserverInterface $observer */
// Check if exists data title
if (isset($this->eventData['title'])) {
// Save data type
$this->eventData['type'] = $type;
// Check for hook all registered observers
foreach ($this->observers as $observer) {
// Get data from hook observer
$data = $observer->hookNotificationTitle($this);
// Check if isset data title
if (isset($data['title'])) {
// Set data from hook observer data
$this->setEventData($data);
}
}
return $this->eventData;
}
return null;
}
}