'notification',
'label' => 'Envoyer une notification',
'class' => get_called_class(),
'path' => __FILE__,
'icon' => 'far fa-bell',
'color' => '#ff9f43',
);
if(!isset($key)) return $manifest;
return isset($manifest[$key]) ? $manifest[$key] : '' ;
}
//méthode d'affichage de l'effet
public static function form($item){
$html = '';
$class = get_called_class();
//$class::manifest('icon')
ob_start();
?>
toArray();
if(isset($parameters['old'])) $parameters['old'] = $parameters['old']->toArray();
}
$effect->values['title'] = isset($effect->values['title']) ? template($effect->values['title'],$parameters,true) : '';
$effect->values['message'] =isset($effect->values['message']) ? template($effect->values['message'],$parameters,true): '';
try{
$logs = 'Pour '.$effect->values['recipient'].': '.$effect->values['title'];
Plugin::callHook('emit_notification',array(array(
'label' => $effect->values['title'],
'html' => wysiwyg_filter(html_entity_decode($effect->values['message'])),
'pinned' => 0,
'type' => 'notice',
'recipients' => array($effect->values['recipient'])
)));
}catch(Exception $e){
$logs .= '
Erreur : '.$e->getMessage().'';
}
return $logs;
}
}
?>