pfadizytturm / midatabundle
这是一个用于 symfony 框架的包,包含 midata 绑定和一个个人邮件服务
1.2.9
2022-11-21 20:53 UTC
Requires
- php: >=5.3.3
- rmccue/requests: ^1.7
README
使用 Symfony Flex 的应用程序
打开命令行控制台,进入您的项目目录并执行
$ composer require pfadizytturm/midatabundle
不使用 Symfony Flex 的应用程序
步骤 1: 下载包
打开命令行控制台,进入您的项目目录并执行以下命令以下载此包的最新稳定版本
$ composer require pfadizytturm/midatabundle
此命令需要您全局安装了 Composer,具体请参阅 Composer 文档中的安装章节。
步骤 2: 启用包
然后,通过将其添加到项目中的 app/AppKernel.php 文件中注册的包列表中来启用该包
<?php // app/AppKernel.php // ... class AppKernel extends Kernel { public function registerBundles() { $bundles = array( // ... new PfadiZytturm\MidataBundle\PfadiZytturmMidataBundle(), ); // ... } // ... }
步骤 3: 启用路由
此包附带一个 /mail 路由。您可以按需设置前缀。
Midata: resource: "@PfadiZytturmMidataBundle/Resources/config/routing.yml" prefix: <your prefix>
步骤 4: 配置
该包需要在您的 app/config/config.yml 文件中进行一些配置
pfadi_zytturm_midata: mail: mail_domain: # set this to a domain, if you want to enforce your mails to come from <nickname>@your-domain.ch logger: # if you want to use the mailing, you need to specify a mailing service # this service must have a public method: # sendMail(string $content, string $subject, array $receivers, # array [$sende_mail => $sender_name], string $attachement] mailer: # if you want to use the logger, you need to specify a logger service # this service must have a public method: # log(string $message) done_view: # set this if you want to set a custom view after the mail has been sent key_mapping: # you can overwrite the default set of mappings from the midata keys to the keys displayed for the # mail replacement midata: user: # (required) user for the login to midata password: # (required) password for the login to midata groupId: # (required) set the main group id. role_mapping: # change this to overwrite the default midata group to symfony role mapping when you use the login # mechanism cache: ttl: # change this to change the TTL of the cached midata values