*/ /** * Klasa stReminder * * @package stReminderPlugin * @subpackage libs */ class stReminder { protected static $list = array(); /** * Dodanie przypomnienia * * @param $module string nazwa modułu * @param $message string wiadmość przypomniania */ public static function add($module, $message, $type = 'notify') { if ($module == 'stPositioningBackend') { $type = 'warning'; } self::$list[$module] = array('message' => $message, 'type' => $type); $alert = BackendAlertPeer::retrieveByCode($module); if (!is_object($alert)) { $alert = new BackendAlert(); $alert->setCulture(stLanguage::getOptLanguage()); $alert->setCode($module); $alert->setName($message); $alert->setDisplay(0); $alert->save(); } } public static function getCodes() { return array_keys(self::$list); } }