From e5c84cbcd55cb2b07ec3c94763a1fe68322a9600 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Mon, 27 Aug 2018 10:14:29 +0200 Subject: [PATCH] Remove event template code #2178 - Tables removed: event_email_template, event_sent, user_rel_event_type --- app/Migrations/Schema/V200/Version20.php | 8 + app/config/events.conf.dist.php | 67 ----- main/admin/configure_homepage.php | 3 - main/inc/ajax/model.ajax.php | 31 -- main/inc/lib/database.constants.inc.php | 5 - main/inc/lib/event_email_template.class.php | 144 ---------- main/inc/lib/events.lib.php | 98 ------- main/inc/lib/events_dispatcher.class.php | 55 ---- main/inc/lib/events_email.class.php | 285 ------------------- main/inc/lib/usermanager.lib.php | 128 ++++----- main/install/install_files.inc.php | 4 - src/CoreBundle/Entity/EventEmailTemplate.php | 193 ------------- src/CoreBundle/Entity/EventSent.php | 127 --------- src/CoreBundle/Entity/UserRelEventType.php | 102 ------- 14 files changed, 68 insertions(+), 1182 deletions(-) delete mode 100644 app/config/events.conf.dist.php delete mode 100755 main/inc/lib/event_email_template.class.php delete mode 100755 main/inc/lib/events_dispatcher.class.php delete mode 100755 main/inc/lib/events_email.class.php delete mode 100644 src/CoreBundle/Entity/EventEmailTemplate.php delete mode 100644 src/CoreBundle/Entity/EventSent.php delete mode 100644 src/CoreBundle/Entity/UserRelEventType.php diff --git a/app/Migrations/Schema/V200/Version20.php b/app/Migrations/Schema/V200/Version20.php index 4e03211210..9ee78806d0 100644 --- a/app/Migrations/Schema/V200/Version20.php +++ b/app/Migrations/Schema/V200/Version20.php @@ -637,6 +637,14 @@ class Version20 extends AbstractMigrationChamilo $this->addSql('ALTER TABLE c_document CHANGE session_id session_id INT DEFAULT NULL;'); $this->addSql('ALTER TABLE c_document ADD CONSTRAINT FK_C9FA0CBD613FECDF FOREIGN KEY (session_id) REFERENCES session (id)'); $this->addSql('CREATE INDEX IDX_C9FA0CBD613FECDF ON c_document (session_id)'); + + // Drop unused tables + $dropTables = ['event_email_template', 'event_sent', 'user_rel_event_type']; + foreach ($dropTables as $table) { + if ($schema->hasTable($table)) { + $schema->dropTable($table); + } + } } /** diff --git a/app/config/events.conf.dist.php b/app/config/events.conf.dist.php deleted file mode 100644 index 087cba1a2c..0000000000 --- a/app/config/events.conf.dist.php +++ /dev/null @@ -1,67 +0,0 @@ - array( // key for "user registration" event - 'actions' => array( // we link this event to a bunch of functions that will be triggered when the event is fired - 'event_send_mail' // don't forget to actually write this function in the events.lib.php file - ), - 'self_sent' => false, // this key states that we can't add user to this event through the admin panel - 'name_lang_var' => get_lang('PortalHomepageEdited'), - 'desc_lang_var' => get_lang('PortalHomepageEdited'), - 'available_keyvars' => array (// keys used for the mail template - 'url' => 'portal', - 'sitename' => 'sitename', - 'firstname' => 'firstname', - 'lastname' => 'lastname', - 'username' => 'username', - 'usermail' => 'usermail', - 'password' => 'password', - 'user_lang' => 'language', - 'admin_name' => 'administrator_name', - 'admin_surname' => 'administrator_surname', - 'admin_phone' => 'administrator_phone', - 'admin_email' => 'administrator_email', - ) - ), - 'user_registration' => array( // key for "user registration" event - 'actions' => array( // we link this event to a bunch of functions that will be triggered when the event is fired - 'event_send_mail' // don't forget to actually write this function in the events.lib.php file - ), - 'self_sent' => true, // this key states that we can't add user to this event through the admin panel - 'name_lang_var' => get_lang('UserRegistrationTitle'), - 'desc_lang_var' => get_lang('UserRegistrationComment'), - 'available_keyvars' => array (// keys used for the mail template - 'url' => 'portal', - 'sitename' => 'sitename', - 'firstname' => 'firstname', - 'lastname' => 'lastname', - 'username' => 'username', - 'usermail' => 'usermail', - 'password' => 'password', - 'user_lang' => 'language', - 'admin_name' => 'administrator_name', - 'admin_surname' => 'administrator_surname', - 'admin_phone' => 'administrator_phone', - 'admin_email' => 'administrator_email', - ) - ), -); - - -@include 'events.conf.local.php'; diff --git a/main/admin/configure_homepage.php b/main/admin/configure_homepage.php index 947da06f83..f952027f19 100755 --- a/main/admin/configure_homepage.php +++ b/main/admin/configure_homepage.php @@ -259,9 +259,6 @@ if (!empty($action)) { } } - if (EventsMail::check_if_using_class('portal_homepage_edited')) { - EventsDispatcher::events('portal_homepage_edited', ['about_user' => api_get_user_id()]); - } Event::addEvent( LOG_HOMEPAGE_CHANGED, 'edit_top', diff --git a/main/inc/ajax/model.ajax.php b/main/inc/ajax/model.ajax.php index c255dcf23a..83770bb14d 100755 --- a/main/inc/ajax/model.ajax.php +++ b/main/inc/ajax/model.ajax.php @@ -731,10 +731,6 @@ switch ($action) { $obj = new Gradebook(); $count = $obj->get_count(); break; - case 'get_event_email_template': - $obj = new EventEmailTemplate(); - $count = $obj->get_count(); - break; case 'get_careers': $obj = new Career(); $count = $obj->get_count(); @@ -1872,32 +1868,6 @@ switch ($action) { } $result = $new_result; break; - case 'get_event_email_template': - $columns = ['subject', 'event_type_name', 'language_id', 'activated', 'actions']; - if (!in_array($sidx, $columns)) { - $sidx = 'subject'; - } - $result = Database::select( - '*', - $obj->table, - ['order' => "$sidx $sord", 'LIMIT' => "$start , $limit"] - ); - $new_result = []; - foreach ($result as $item) { - $language_info = api_get_language_info($item['language_id']); - $item['language_id'] = $language_info['english_name']; - $item['actions'] = Display::url( - Display::return_icon('edit.png', get_lang('Edit')), - api_get_path(WEB_CODE_PATH).'admin/event_type.php?action=edit&event_type_name='.$item['event_type_name'] - ); - $item['actions'] .= Display::url( - Display::return_icon('delete.png', get_lang('Delete')), - api_get_path(WEB_CODE_PATH).'admin/event_controller.php?action=delete&id='.$item['id'] - ); - $new_result[] = $item; - } - $result = $new_result; - break; case 'get_careers': $columns = ['name', 'description', 'actions']; if (!in_array($sidx, $columns)) { @@ -2208,7 +2178,6 @@ $allowed_actions = [ 'get_work_user_list_all', 'get_timelines', 'get_grade_models', - 'get_event_email_template', 'get_user_skill_ranking', 'get_extra_fields', 'get_extra_field_options', diff --git a/main/inc/lib/database.constants.inc.php b/main/inc/lib/database.constants.inc.php index d92028ecda..a19e6e0369 100755 --- a/main/inc/lib/database.constants.inc.php +++ b/main/inc/lib/database.constants.inc.php @@ -299,11 +299,6 @@ define('TABLE_NOTIFICATION', 'notification'); define('TABLE_TRACK_STORED_VALUES', 'track_stored_values'); define('TABLE_TRACK_STORED_VALUES_STACK', 'track_stored_values_stack'); -//Event tables -define('TABLE_EVENT_EMAIL_TEMPLATE', 'event_email_template'); -define('TABLE_EVENT_TYPE_REL_USER', 'user_rel_event_type'); -define('TABLE_EVENT_SENT', 'event_sent'); - define('TABLE_MAIN_SKILL', 'skill'); define('TABLE_MAIN_SKILL_REL_SKILL', 'skill_rel_skill'); define('TABLE_MAIN_SKILL_REL_GRADEBOOK', 'skill_rel_gradebook'); diff --git a/main/inc/lib/event_email_template.class.php b/main/inc/lib/event_email_template.class.php deleted file mode 100755 index c288c675dc..0000000000 --- a/main/inc/lib/event_email_template.class.php +++ /dev/null @@ -1,144 +0,0 @@ -table = Database::get_main_table(TABLE_EVENT_EMAIL_TEMPLATE); - } - - /** - * @param array $where_conditions - * - * @return array - */ - public function get_all($where_conditions = []) - { - return Database::select( - '*', - $this->table, - ['where' => $where_conditions, 'order' => 'name ASC'] - ); - } - - /** - * Displays the title + grid. - */ - public function display() - { - // action links - $content = Display::actions( - [ - [ - 'url' => 'event_type.php', - 'content' => Display::return_icon( - 'new_document.png', - get_lang('Add'), - [], - ICON_SIZE_MEDIUM - ), - ], - ] - ); - $content .= Display::grid_html('event_email_template'); - - return $content; - } - - /** - * @return array - */ - public function get_status_list() - { - return [ - EVENT_EMAIL_TEMPLATE_ACTIVE => get_lang('Enabled'), - EVENT_EMAIL_TEMPLATE_INACTIVE => get_lang('Disabled'), - ]; - } - - /** - * Returns a Form validator Obj. - * - * @param string $url - * @param string $action add, edit - * - * @return FormValidator - */ - public function return_form($url, $action) - { - $form = new FormValidator('career', 'post', $url); - // Setting the form elements - $header = get_lang('Add'); - if ($action == 'edit') { - $header = get_lang('Modify'); - } - - $form->addElement('header', $header); - $id = isset($_GET['id']) ? intval($_GET['id']) : ''; - $form->addElement('hidden', 'id', $id); - $form->addElement('text', 'name', get_lang('Name'), ['size' => '70']); - $form->addHtmlEditor( - 'description', - get_lang('Description'), - false, - false, - [ - 'ToolbarSet' => 'careers', - 'Width' => '100%', - 'Height' => '250', - ] - ); - $status_list = $this->get_status_list(); - $form->addElement('select', 'status', get_lang('Status'), $status_list); - if ($action == 'edit') { - $form->addElement('text', 'created_at', get_lang('CreatedAt')); - $form->freeze('created_at'); - } - - if ($action == 'edit') { - $form->addButtonSave(get_lang('Modify'), 'submit'); - } else { - $form->addButtonCreate(get_lang('Add'), 'submit'); - } - - // Setting the defaults - $defaults = $this->get($id); - - if (!empty($defaults['created_at'])) { - $defaults['created_at'] = api_convert_and_format_date($defaults['created_at']); - } - if (!empty($defaults['updated_at'])) { - $defaults['updated_at'] = api_convert_and_format_date($defaults['updated_at']); - } - $form->setDefaults($defaults); - - // Setting the rules - $form->addRule('name', get_lang('ThisFieldIsRequired'), 'required'); - - return $form; - } - - public function get_count() - { - $row = Database::select('count(*) as count', $this->table, [], 'first'); - - return $row['count']; - } -} diff --git a/main/inc/lib/events.lib.php b/main/inc/lib/events.lib.php index f5a1b606f8..b004c8e574 100644 --- a/main/inc/lib/events.lib.php +++ b/main/inc/lib/events.lib.php @@ -2202,102 +2202,4 @@ class Event return false; } - - /** - * For the sake of genericity, this function is a switch. - * It's called by EventsDispatcher and fires the good function - * with the good require_once. - * - * @deprecated - * - * @param string $event_name - * @param array $params - */ - public static function event_send_mail($event_name, $params) - { - EventsMail::send_mail($event_name, $params); - } - - /** - * Internal function checking if the mail was already sent from that user to that user. - * - * @param string $event_name - * @param int $user_from - * @param int $user_to - * - * @return bool - */ - public static function check_if_mail_already_sent( - $event_name, - $user_from, - $user_to = null - ) { - if ($user_to == null) { - $sql = 'SELECT COUNT(*) as total - FROM '.Database::get_main_table(TABLE_EVENT_SENT).' - WHERE - user_from = '.$user_from.' AND - event_type_name = "'.$event_name.'"'; - } else { - $sql = 'SELECT COUNT(*) as total - FROM '.Database::get_main_table(TABLE_EVENT_SENT).' - WHERE - user_from = '.$user_from.' AND - user_to = '.$user_to.' AND - event_type_name = "'.$event_name.'"'; - } - $result = Database::store_result(Database::query($sql), 'ASSOC'); - - return $result[0]["total"]; - } - - /** - * Filter EventEmailTemplate Filters see the main/inc/conf/events.conf.dist.php. - */ - - /** - * Basic template event message filter (to be used by other filters as default). - * - * @deprecated - * - * @param array $values (passing by reference) * - * - * @return bool True if everything is OK, false otherwise - */ - public function event_send_mail_filter_func(&$values) - { - return true; - } - - /** - * user_registration - send_mail filter. - * - * @deprecated - * - * @param array $values (passing by reference) - * - * @return bool True if everything is OK, false otherwise - */ - public function user_registration_event_send_mail_filter_func(&$values) - { - $res = self::event_send_mail_filter_func($values); - // proper logic for this filter - return $res; - } - - /** - * portal_homepage_edited - send_mail filter. - * - * @deprecated - * - * @param array $values (passing by reference) - * - * @return bool True if everything is OK, false otherwise - */ - public function portal_homepage_edited_event_send_mail_filter_func(&$values) - { - $res = self::event_send_mail_filter_func($values); - // proper logic for this filter - return $res; - } } diff --git a/main/inc/lib/events_dispatcher.class.php b/main/inc/lib/events_dispatcher.class.php deleted file mode 100755 index 3e991c0023..0000000000 --- a/main/inc/lib/events_dispatcher.class.php +++ /dev/null @@ -1,55 +0,0 @@ -", $message); - api_mail_html( - $recipient_name, - $user_info["mail"], - $subject, - $message, - $sender_name, - $email_admin, - null, - [$values['certificate_pdf_file']] - ); - } else { - api_mail_html( - $recipient_name, - $user_info["mail"], - $subject, - $message, - $sender_name, - $email_admin - ); - } - - // If the mail only need to be send once (we know that thanks to the events.conf), we log it in the table - if ($event_config[$event_name]["sending_mail_once"]) { - $sql = 'INSERT INTO '.Database::get_main_table(TABLE_EVENT_SENT).' (user_from, user_to, event_type_name) - VALUES ('.$event_data["user_id"].', '.$id.' ,"'.Database::escape_string($event_name).'") - '; - Database::query($sql); - } - } - } - - // Second, we send to people linked to the event - // So, we get everyone - $sql = 'SELECT u.user_id, u.language, u.email, u.firstname, u.lastname - FROM '.Database::get_main_table(TABLE_EVENT_TYPE_REL_USER).' ue - INNER JOIN '.Database::get_main_table(TABLE_MAIN_USER).' u ON u.user_id = ue.user_id - WHERE event_type_name = "'.$event_name.'"'; - $result = Database::store_result(Database::query($sql), 'ASSOC'); - // for each of the linked users - foreach ($result as $key => $value) { - // we get the language - if ($event_data["prior_lang"] != null) { - // if $lang is not null, we use that lang - $language = $event_data["prior_lang"]; - } else { - // else we get the user's lang - $sql = 'SELECT language FROM '.Database::get_main_table(TABLE_MAIN_USER).' - where user_id = '.$value["user_id"].' '; - $result = Database::store_result(Database::query($sql), 'ASSOC'); - - $language = $result[0]["language"]; - } - - // we get the message in the correct language (or in english if doesn't exist) - $result = self::getMessage($event_name, $language); - $message = ''; - $subject = ''; - self::getCorrectMessage($message, $subject, $language, $result); - - // replace the keycodes used in the message - self::formatMessage($message, $subject, $event_config, $event_name, $event_data); - - // we send the mail - $recipient_name = api_get_person_name($value['firstname'], $value['lastname']); - - api_mail_html( - $recipient_name, - $value["email"], - $subject, - $message, - $sender_name, - $email_admin - ); - - // If the mail only need to be send once (we know that thanks to the events.conf, we log it in the table - if ($event_config[$event_name]["sending_mail_once"]) { - $sql = 'INSERT INTO '.Database::get_main_table(TABLE_EVENT_SENT).' - (user_from, user_to, event_type_name) - VALUES ('.$event_data["user_id"].', '.$value["user_id"].' , "'.Database::escape_string($event_name).'"); - '; - Database::query($sql); - } - } - } - - /** - * Checks if a message in a language exists, if the event is activated - * and if "manage event" is checked in admin panel. - * If yes to three, we can use this class, else we still use api_mail. - * - * @param string $event_name - * - * @return bool - */ - public static function check_if_using_class($event_name) - { - if (api_get_setting('activate_email_template') === 'false') { - return false; - } - $current_language = api_get_interface_language(); - - $sql = 'SELECT COUNT(*) as total - FROM '.Database::get_main_table(TABLE_EVENT_EMAIL_TEMPLATE).' em - INNER JOIN '.Database::get_main_table(TABLE_MAIN_LANGUAGE).' l - ON em.language_id = l.id - WHERE - em.event_type_name = "'.$event_name.'" and - l.dokeos_folder = "'.$current_language.'" and - em.activated = 1'; - - $exists = Database::store_result(Database::query($sql), 'ASSOC'); - if ($exists[0]["total"]) { - return true; - } else { - return false; - } - } - - /** - * Get the record containing the good message and subject. - * - * @param string $event_name - * @param string $language - * - * @return array - */ - private static function getMessage($event_name, $language) - { - $sql = 'SELECT message, subject, l.dokeos_folder - FROM '.Database::get_main_table(TABLE_EVENT_EMAIL_TEMPLATE).' em - INNER JOIN '.Database::get_main_table(TABLE_MAIN_LANGUAGE).' l - ON em.language_id = l.id - WHERE - em.event_type_name = "'.$event_name.'" AND - (l.dokeos_folder = "'.$language.'" OR l.dokeos_folder = "english") AND - em.message <> "" - '; - - return Database::store_result(Database::query($sql), 'ASSOC'); - } - - /** - * Get the correct message, meaning in the specified language or in english if previous one doesn't exist. - * - * @param string $message - * @param string $subject - * @param string $language - * @param array $result - */ - private static function getCorrectMessage(&$message, &$subject, $language, $result) - { - foreach ($result as $msg) { - if ($msg["dokeos_folder"] == $language) { - $message = $msg["message"]; - $subject = $msg["subject"]; - break; - } else { - if ($msg["dokeos_folder"] == "english") { - $message = $msg["message"]; - $subject = $msg["subject"]; - } - } - } - } - - /** - * Replaces the ((key)) by the good values. - * - * @param string $message - * @param string $subject - * @param array $event_config - * @param string $event_name - */ - private static function formatMessage(&$message, &$subject, $event_config, $event_name, &$event_data) - { - foreach ($event_config[$event_name]["available_keyvars"] as $key => $word) { - $message = str_replace('(('.$key.'))', $event_data[$word], $message); - $subject = str_replace('(('.$key.'))', $event_data[$word], $subject); - } - } -} diff --git a/main/inc/lib/usermanager.lib.php b/main/inc/lib/usermanager.lib.php index 826b04f113..c53d3614c6 100755 --- a/main/inc/lib/usermanager.lib.php +++ b/main/inc/lib/usermanager.lib.php @@ -476,44 +476,65 @@ class UserManager $layoutContent = $tplContent->get_template('mail/content_registration_platform.tpl'); $emailBody = $tplContent->fetch($layoutContent); - /* MANAGE EVENT WITH MAIL */ - if (EventsMail::check_if_using_class('user_registration')) { - $values["about_user"] = $return; - $values["password"] = $original_password; - $values["send_to"] = [$return]; - $values["prior_lang"] = null; - EventsDispatcher::events('user_registration', $values); - } else { - $phoneNumber = isset($extra['mobile_phone_number']) ? $extra['mobile_phone_number'] : null; + $phoneNumber = isset($extra['mobile_phone_number']) ? $extra['mobile_phone_number'] : null; - $additionalParameters = [ - 'smsType' => SmsPlugin::WELCOME_LOGIN_PASSWORD, - 'userId' => $return, - 'mobilePhoneNumber' => $phoneNumber, - 'password' => $original_password, - ]; + $additionalParameters = [ + 'smsType' => SmsPlugin::WELCOME_LOGIN_PASSWORD, + 'userId' => $return, + 'mobilePhoneNumber' => $phoneNumber, + 'password' => $original_password, + ]; - $twoEmail = api_get_configuration_value('send_two_inscription_confirmation_mail'); - if ($twoEmail === true) { - $layoutContent = $tplContent->get_template('mail/new_user_first_email_confirmation.tpl'); - $emailBody = $tplContent->fetch($layoutContent); + $twoEmail = api_get_configuration_value('send_two_inscription_confirmation_mail'); + if ($twoEmail === true) { + $layoutContent = $tplContent->get_template('mail/new_user_first_email_confirmation.tpl'); + $emailBody = $tplContent->fetch($layoutContent); - api_mail_html( - $recipient_name, - $email, + api_mail_html( + $recipient_name, + $email, + $emailSubject, + $emailBody, + $sender_name, + $email_admin, + null, + null, + null, + $additionalParameters + ); + + $layoutContent = $tplContent->get_template('mail/new_user_second_email_confirmation.tpl'); + $emailBody = $tplContent->fetch($layoutContent); + + api_mail_html( + $recipient_name, + $email, + $emailSubject, + $emailBody, + $sender_name, + $email_admin, + null, + null, + null, + $additionalParameters + ); + } else { + $sendToInbox = api_get_configuration_value('send_inscription_msg_to_inbox'); + if ($sendToInbox) { + $adminList = self::get_all_administrators(); + $senderId = 1; + if (!empty($adminList)) { + $adminInfo = current($adminList); + $senderId = $adminInfo['user_id']; + } + + MessageManager::send_message_simple( + $userId, $emailSubject, $emailBody, - $sender_name, - $email_admin, - null, - null, - null, - $additionalParameters + $senderId ); - - $layoutContent = $tplContent->get_template('mail/new_user_second_email_confirmation.tpl'); - $emailBody = $tplContent->fetch($layoutContent); - + } else { api_mail_html( $recipient_name, $email, @@ -526,47 +547,18 @@ class UserManager null, $additionalParameters ); - } else { - $sendToInbox = api_get_configuration_value('send_inscription_msg_to_inbox'); - if ($sendToInbox) { - $adminList = self::get_all_administrators(); - $senderId = 1; - if (!empty($adminList)) { - $adminInfo = current($adminList); - $senderId = $adminInfo['user_id']; - } - - MessageManager::send_message_simple( - $userId, - $emailSubject, - $emailBody, - $senderId - ); - } else { - api_mail_html( - $recipient_name, - $email, - $emailSubject, - $emailBody, - $sender_name, - $email_admin, - null, - null, - null, - $additionalParameters - ); - } } + } - $notification = api_get_configuration_value('send_notification_when_user_added'); - if (!empty($notification) && isset($notification['admins']) && is_array($notification['admins'])) { - foreach ($notification['admins'] as $adminId) { - $emailSubjectToAdmin = get_lang('UserAdded').': '.api_get_person_name($firstName, $lastName); - MessageManager::send_message_simple($adminId, $emailSubjectToAdmin, $emailBody, $userId); - } + $notification = api_get_configuration_value('send_notification_when_user_added'); + if (!empty($notification) && isset($notification['admins']) && is_array($notification['admins'])) { + foreach ($notification['admins'] as $adminId) { + $emailSubjectToAdmin = get_lang('UserAdded').': '.api_get_person_name($firstName, $lastName); + MessageManager::send_message_simple($adminId, $emailSubjectToAdmin, $emailBody, $userId); } } + if ($sendEmailToAllAdmins) { $adminList = self::get_all_administrators(); diff --git a/main/install/install_files.inc.php b/main/install/install_files.inc.php index d635d4a628..1a4815bbfb 100755 --- a/main/install/install_files.inc.php +++ b/main/install/install_files.inc.php @@ -40,10 +40,6 @@ if (defined('SYSTEM_INSTALLATION')) { api_get_path(CONFIGURATION_PATH).'profile.conf.dist.php', api_get_path(CONFIGURATION_PATH).'profile.conf.php' ); - copy( - api_get_path(CONFIGURATION_PATH).'events.conf.dist.php', - api_get_path(CONFIGURATION_PATH).'events.conf.php' - ); copy( api_get_path(CONFIGURATION_PATH).'auth.conf.dist.php', api_get_path(CONFIGURATION_PATH).'auth.conf.php' diff --git a/src/CoreBundle/Entity/EventEmailTemplate.php b/src/CoreBundle/Entity/EventEmailTemplate.php deleted file mode 100644 index 25749b203f..0000000000 --- a/src/CoreBundle/Entity/EventEmailTemplate.php +++ /dev/null @@ -1,193 +0,0 @@ -message = $message; - - return $this; - } - - /** - * Get message. - * - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Set subject. - * - * @param string $subject - * - * @return EventEmailTemplate - */ - public function setSubject($subject) - { - $this->subject = $subject; - - return $this; - } - - /** - * Get subject. - * - * @return string - */ - public function getSubject() - { - return $this->subject; - } - - /** - * Set eventTypeName. - * - * @param string $eventTypeName - * - * @return EventEmailTemplate - */ - public function setEventTypeName($eventTypeName) - { - $this->eventTypeName = $eventTypeName; - - return $this; - } - - /** - * Get eventTypeName. - * - * @return string - */ - public function getEventTypeName() - { - return $this->eventTypeName; - } - - /** - * Set activated. - * - * @param bool $activated - * - * @return EventEmailTemplate - */ - public function setActivated($activated) - { - $this->activated = $activated; - - return $this; - } - - /** - * Get activated. - * - * @return bool - */ - public function getActivated() - { - return $this->activated; - } - - /** - * Set languageId. - * - * @param int $languageId - * - * @return EventEmailTemplate - */ - public function setLanguageId($languageId) - { - $this->languageId = $languageId; - - return $this; - } - - /** - * Get languageId. - * - * @return int - */ - public function getLanguageId() - { - return $this->languageId; - } - - /** - * Get id. - * - * @return int - */ - public function getId() - { - return $this->id; - } -} diff --git a/src/CoreBundle/Entity/EventSent.php b/src/CoreBundle/Entity/EventSent.php deleted file mode 100644 index 7e581b12f2..0000000000 --- a/src/CoreBundle/Entity/EventSent.php +++ /dev/null @@ -1,127 +0,0 @@ -userFrom = $userFrom; - - return $this; - } - - /** - * Get userFrom. - * - * @return int - */ - public function getUserFrom() - { - return $this->userFrom; - } - - /** - * Set userTo. - * - * @param int $userTo - * - * @return EventSent - */ - public function setUserTo($userTo) - { - $this->userTo = $userTo; - - return $this; - } - - /** - * Get userTo. - * - * @return int - */ - public function getUserTo() - { - return $this->userTo; - } - - /** - * Set eventTypeName. - * - * @param string $eventTypeName - * - * @return EventSent - */ - public function setEventTypeName($eventTypeName) - { - $this->eventTypeName = $eventTypeName; - - return $this; - } - - /** - * Get eventTypeName. - * - * @return string - */ - public function getEventTypeName() - { - return $this->eventTypeName; - } - - /** - * Get id. - * - * @return int - */ - public function getId() - { - return $this->id; - } -} diff --git a/src/CoreBundle/Entity/UserRelEventType.php b/src/CoreBundle/Entity/UserRelEventType.php deleted file mode 100644 index 7457d2ee7c..0000000000 --- a/src/CoreBundle/Entity/UserRelEventType.php +++ /dev/null @@ -1,102 +0,0 @@ -userId = $userId; - - return $this; - } - - /** - * Get userId. - * - * @return int - */ - public function getUserId() - { - return $this->userId; - } - - /** - * Set eventTypeName. - * - * @param string $eventTypeName - * - * @return UserRelEventType - */ - public function setEventTypeName($eventTypeName) - { - $this->eventTypeName = $eventTypeName; - - return $this; - } - - /** - * Get eventTypeName. - * - * @return string - */ - public function getEventTypeName() - { - return $this->eventTypeName; - } - - /** - * Get id. - * - * @return int - */ - public function getId() - { - return $this->id; - } -}