mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-30 11:33:49 +00:00
associate location on ms calendar remote
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user