Open a command console, enter your project directory and execute:
$ composer require pfadizytturm/midatabundle
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
$ composer require pfadizytturm/midatabundle
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Then, enable the bundle by adding it to the list of registered bundles
in the app/AppKernel.php
file of your project:
<?php
// app/AppKernel.php
// ...
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
// ...
new PfadiZytturm\MidataBundle\PfadiZytturmMidataBundle(),
);
// ...
}
// ...
}
This bundle comes with a /mail route. Set the prefix as you whish.
Midata:
resource: "@PfadiZytturmMidataBundle/Resources/config/routing.yml"
prefix: <your prefix>
The bundle needs some configuration in your 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