mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-16 14:33:14 +00:00
PHRAS-3668 subtitle notification (#4416)
* subtitle notification * fix notif
This commit is contained in:
@@ -47,6 +47,7 @@ class eventsmanager_broker
|
||||
'eventsmanager_notify_push',
|
||||
'eventsmanager_notify_basketwip',
|
||||
'eventsmanager_notify_register',
|
||||
'eventsmanager_notify_subtitle',
|
||||
'eventsmanager_notify_uploadquarantine',
|
||||
'eventsmanager_notify_validate',
|
||||
'eventsmanager_notify_validationdone',
|
||||
|
69
lib/classes/eventsmanager/notify/subtitle.php
Normal file
69
lib/classes/eventsmanager/notify/subtitle.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2023 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use Alchemy\Phrasea\Model\Entities\User;
|
||||
|
||||
class eventsmanager_notify_subtitle extends eventsmanager_notifyAbstract
|
||||
{
|
||||
/**
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function icon_url()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param Array $data
|
||||
* @param boolean $unread
|
||||
* @return Array
|
||||
*/
|
||||
public function datas(array $data, $unread)
|
||||
{
|
||||
$text = $this->app->trans($data['translateMessage'], ['%title%' => $data['title'], '%langues%' => $data['langues']]);
|
||||
|
||||
return [
|
||||
'text' => $text,
|
||||
'class' => ($unread == 1 ? 'reload_baskets' : '')
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_name()
|
||||
{
|
||||
return $this->app->trans('notification:: subtitle');
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_description()
|
||||
{
|
||||
return $this->app->trans('notification:: Receive notification when subtitle generated');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param integer $usr_id The id of the user to check
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function is_available(User $user)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user