ソースを参照

Merge branch 'develop'

master
Guillaume 4年前
コミット
812c9bee98
2個のファイルの変更22行の追加0行の削除
  1. +11
    -0
      ShopBundle/Services/MailUtils.php
  2. +11
    -0
      ShopBundle/Services/Utils.php

+ 11
- 0
ShopBundle/Services/MailUtils.php ファイルの表示

const SUBJECT = 'subject'; const SUBJECT = 'subject';
const SUBJECT_PREFIX = 'subject-prefix'; const SUBJECT_PREFIX = 'subject-prefix';
const TO_EMAIL = 'to-email'; const TO_EMAIL = 'to-email';
const COPY_TO = 'copy-to';
const COPY_HIDDEN_TO = 'copy-hidden-to';
const TO_NAME = 'to-name'; const TO_NAME = 'to-name';
const FROM_EMAIL = 'from-email'; const FROM_EMAIL = 'from-email';
const FROM_NAME = 'from-name'; const FROM_NAME = 'from-name';
->setBody($this->templating->render($params[self::CONTENT_TEMPLATE] . '-html.html.twig', $contentData), 'text/html') ->setBody($this->templating->render($params[self::CONTENT_TEMPLATE] . '-html.html.twig', $contentData), 'text/html')
->addPart($this->templating->render($params[self::CONTENT_TEMPLATE] . '-text.html.twig', $contentData)); ->addPart($this->templating->render($params[self::CONTENT_TEMPLATE] . '-text.html.twig', $contentData));


if (isset($params[self::COPY_TO]) && strlen($params[self::COPY_TO])) {
$message->addCc($params[self::COPY_TO]);
}

if (isset($params[self::COPY_HIDDEN_TO]) && strlen($params[self::COPY_HIDDEN_TO])) {
$message->addBcc($params[self::COPY_HIDDEN_TO]);
}


if (isset($params[self::REPLY_TO]) && strlen($params[self::REPLY_TO])) { if (isset($params[self::REPLY_TO]) && strlen($params[self::REPLY_TO])) {
$message->addReplyTo($params[self::REPLY_TO]); $message->addReplyTo($params[self::REPLY_TO]);
} }

+ 11
- 0
ShopBundle/Services/Utils.php ファイルの表示

use EasyCorp\Bundle\EasyAdminBundle\Configuration\ConfigManager; use EasyCorp\Bundle\EasyAdminBundle\Configuration\ConfigManager;
use Geocoder\Model\Coordinates; use Geocoder\Model\Coordinates;
use Geocoder\Provider\Addok\Addok; use Geocoder\Provider\Addok\Addok;
use Geocoder\Provider\GoogleMaps\GoogleMaps;
use Geocoder\Provider\Nominatim\Nominatim;
use Geocoder\Query\GeocodeQuery; use Geocoder\Query\GeocodeQuery;
use Geocoder\Query\ReverseQuery; use Geocoder\Query\ReverseQuery;
use Lc\ShopBundle\Context\ImageInterface; use Lc\ShopBundle\Context\ImageInterface;
public function getGeocoderProvider() public function getGeocoderProvider()
{ {
$symfonyClient = new HttplugClient(); $symfonyClient = new HttplugClient();

/* API du gouvernement */
$provider = new Addok($symfonyClient, 'https://api-adresse.data.gouv.fr') ; $provider = new Addok($symfonyClient, 'https://api-adresse.data.gouv.fr') ;

/* Google Maps */
//$provider = new GoogleMaps($symfonyClient, null, '') ;

/* Nominatim : OpenStreetMap */
//$provider = Nominatim::withOpenStreetMapServer($symfonyClient, 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion');

return $provider ; return $provider ;
} }



読み込み中…
キャンセル
保存