From 7258b79a4fe3d07a2de2a30faa28482f2f6cd452 Mon Sep 17 00:00:00 2001 From: Joel Alphonso Date: Wed, 13 Mar 2024 15:25:20 -0400 Subject: [PATCH] fix(policy-link): remove unused label and active fields --- .../model/structure/privacy-policy-link.json | 5 --- .../CookieConsent/Model/Structure/Link.php | 37 ------------------- 2 files changed, 42 deletions(-) diff --git a/metadata/admin/charcoal/cookie-consent/model/structure/privacy-policy-link.json b/metadata/admin/charcoal/cookie-consent/model/structure/privacy-policy-link.json index 22ac551..2c63c08 100644 --- a/metadata/admin/charcoal/cookie-consent/model/structure/privacy-policy-link.json +++ b/metadata/admin/charcoal/cookie-consent/model/structure/privacy-policy-link.json @@ -1,7 +1,2 @@ { - "properties": { - "label": { - "placeholder": "cookie-consent.admin.form.privacy-policy.label" - } - } } diff --git a/src/Charcoal/CookieConsent/Model/Structure/Link.php b/src/Charcoal/CookieConsent/Model/Structure/Link.php index 6d60295..488e741 100644 --- a/src/Charcoal/CookieConsent/Model/Structure/Link.php +++ b/src/Charcoal/CookieConsent/Model/Structure/Link.php @@ -24,8 +24,6 @@ class Link extends StructureModel public const TARGET_BLANK = '_blank'; - private bool $active = false; - private ?Translation $label = null; private string $type = self::DEFAULT_TYPE; private ?string $target = null; @@ -36,41 +34,6 @@ class Link extends StructureModel private ?LinkRelationRepository $modelRepository = null; - public function getActive(): bool - { - return $this->active; - } - - public function isActive(): bool - { - return $this->getActive(); - } - - /** - * @param mixed $active The active toggle. - */ - public function setActive($active): self - { - $this->active = (bool)$active; - - return $this; - } - - public function getLabel(): ?Translation - { - return $this->label; - } - - /** - * @param mixed $label The link label. - */ - public function setLabel($label): self - { - $this->label = $this->translator()->translation($label); - - return $this; - } - public function getType(): ?string { return $this->type;