-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PHRAS-3668 subtitle notification (#4416)
* subtitle notification * fix notif
- Loading branch information
Showing
15 changed files
with
251 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.