template('admin/settings.sys', ['options' => &$options]); } /** * Список шаблонов уведомлений * @return array */ public function sendmailTemplates(): array { $amountExample = '
' . Currency::formatPriceAndCurrency(100) . '
'; $templates = [ 'users_balance_plus' => [ 'title' => _t('bills', 'Balance Top Up'), 'description' => _t('bills', 'Notification sent to the user in case of successful balance Top Up'), 'vars' => [ '{name}' => _t('users', 'User Name'), '{email}' => _t('', 'Email'), '{amount}' => _t('bills', 'Top Up Amount [tip]', ['tip' => $amountExample]), '{balance}' => _t('bills', 'Current Balance [tip]', ['tip' => $amountExample]), '{auth_link}' => _t('users', 'Authorization Link'), ], 'priority' => 20, 'enotify' => 0, # всегда ], 'users_balance_admin_plus' => [ 'title' => _t('bills', 'Balance Top Up by Administrator'), 'description' => _t('bills', 'Notification sent to the user when administrator Top Up user\'s balance'), 'vars' => [ '{name}' => _t('users', 'User Name'), '{email}' => _t('', 'Email'), '{amount}' => _t('bills', 'Top Up Amount [tip]', ['tip' => $amountExample]), '{balance}' => _t('bills', 'Current Balance [tip]', ['tip' => $amountExample]), '{description}' => _t('bills', 'Description'), '{auth_link}' => _t('users', 'Authorization Link'), ], 'priority' => 21, 'enotify' => 0, # всегда ], 'users_balance_admin_minus' => [ 'title' => _t('bills', 'Account Write-Off by the Administrator'), 'description' => _t('bills', 'Notification sent to the user when the administrator write-off money from the account'), 'vars' => [ '{name}' => _t('users', 'User Name'), '{email}' => _t('', 'Email'), '{amount}' => _t('bills', 'Top Up Amount [tip]', ['tip' => $amountExample]), '{balance}' => _t('bills', 'Current Balance [tip]', ['tip' => $amountExample]), '{description}' => _t('bills', 'Description'), '{auth_link}' => _t('users', 'Authorization Link'), ], 'priority' => 22, 'enotify' => 0, # всегда ], ]; return $templates; } /** * Метод обрабатывающий ситуацию с удалением пользователя * @param int $userID ID пользователя * @param array $options доп. параметры удаления * @return void */ public function onUserDeleted($userID, array $options = []) { $this->model->onUserDeleted($userID, $options); } /** * Формирование URL * @param string $key ключ * @param array $params доп. параметры * @param bool $dynamic динамическая ссылка * @return string */ public function url(string $key, array $params = [], $dynamic = false): string { return $this->router->url('bills-' . $key, $params, ['dynamic' => $dynamic, 'module' => 'bills']); } }