Skip to content

Commit

Permalink
Enable updateDescription to override the Description
Browse files Browse the repository at this point in the history
  • Loading branch information
ishannz committed Nov 6, 2024
1 parent 2ca8c0a commit 432abfd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/Models/EmailLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ public function getCMSCompositeValidator(): CompositeValidator

public function getDescription(): string
{
return $this->Email ?: '';
$description = $this->Email ?: '';
$this->extend('updateDescription', $description);

return $description;
}

public function getURL(): string
Expand Down
5 changes: 4 additions & 1 deletion src/Models/ExternalLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ public function getCMSCompositeValidator(): CompositeValidator

public function getDescription(): string
{
return $this->ExternalUrl ?: '';
$description = $this->ExternalUrl ?: '';
$this->extend('updateDescription', $description);

return $description;
}

public function getURL(): string
Expand Down
5 changes: 4 additions & 1 deletion src/Models/PhoneLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ public function getCMSCompositeValidator(): CompositeValidator

public function getDescription(): string
{
return $this->Phone ?: '';
$description = $this->Phone ?: '';
$this->extend('updateDescription', $description);

return $description;
}

public function getURL(): string
Expand Down

0 comments on commit 432abfd

Please sign in to comment.