associate location on ms calendar remote

This commit is contained in:
2022-07-01 12:12:48 +02:00
parent 014e281d13
commit 2a6974610f
18 changed files with 359 additions and 28 deletions

View File

@@ -12,7 +12,7 @@ declare(strict_types=1);
namespace Chill\MainBundle\Templating\Entity;
use Chill\MainBundle\Entity\Address;
use Chill\MainBundle\Templating\TranslatableStringHelper;
use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
use Symfony\Component\Templating\EngineInterface;
use function array_merge;
@@ -33,9 +33,9 @@ class AddressRender implements ChillEntityRenderInterface
private EngineInterface $templating;
private TranslatableStringHelper $translatableStringHelper;
private TranslatableStringHelperInterface $translatableStringHelper;
public function __construct(EngineInterface $templating, TranslatableStringHelper $translatableStringHelper)
public function __construct(EngineInterface $templating, TranslatableStringHelperInterface $translatableStringHelper)
{
$this->templating = $templating;
$this->translatableStringHelper = $translatableStringHelper;
@@ -65,7 +65,7 @@ class AddressRender implements ChillEntityRenderInterface
*
* @return string[]
*/
public function renderLines($addr): array
public function renderLines(Address $addr, bool $includeCityLine = true, bool $includeCountry = true): array
{
$lines = [];
@@ -75,14 +75,26 @@ class AddressRender implements ChillEntityRenderInterface
$lines[] = $this->renderBuildingLine($addr);
$lines[] = $this->renderStreetLine($addr);
$lines[] = $this->renderDeliveryLine($addr);
$lines[] = $this->renderCityLine($addr);
$lines[] = $this->renderCountryLine($addr);
if ($includeCityLine) {
$lines[] = $this->renderCityLine($addr);
}
if ($includeCountry) {
$lines[] = $this->renderCountryLine($addr);
}
} else {
$lines[] = $this->renderBuildingLine($addr);
$lines[] = $this->renderDeliveryLine($addr);
$lines[] = $this->renderStreetLine($addr);
$lines[] = $this->renderCityLine($addr);
$lines[] = $this->renderCountryLine($addr);
if ($includeCityLine) {
$lines[] = $this->renderCityLine($addr);
}
if ($includeCountry) {
$lines[] = $this->renderCountryLine($addr);
}
}
}