Files
Phraseanet/lib/classes/eventsmanager/notify/basketwip.php
Aina Sitraka 51c71dc6f0 PHRAS-3851 Untranslated terms : in Notifications, Detailed View, Map (#4351)
* untranslated geoloc tab, validate - preview resultat

* fix notification translation

* PHRAS-2642 alt text video records
2023-07-28 14:15:15 +02:00

77 lines
1.5 KiB
PHP

<?php
/*
* This file is part of Phraseanet
*
* (c) 2005-2016 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_basketwip 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)
{
if (isset($data['message'])) {
// to be retro compatible with old data value
$text = $data['message'];
} else {
$text = $this->app->trans($data['translateMessage'], ['%name%' => $data['name']]);
}
$ret = [
'text' => $text,
'class' => ($unread == 1 ? 'reload_baskets' : '')
];
return $ret;
}
/**
*
* @return string
*/
public function get_name()
{
return $this->app->trans('notification:: Basket WIP');
}
/**
*
* @return string
*/
public function get_description()
{
return $this->app->trans('notification:: Receive notification when a basket is WIP');
}
/**
* @param integer $usr_id The id of the user to check
*
* @return boolean
*/
public function is_available(User $user)
{
return true;
}
}